remove old way of rendering images

This commit is contained in:
2023-03-04 10:56:05 +01:00
parent bc3b6ec3e9
commit 8f369d9943
15 changed files with 52 additions and 264 deletions

View File

@@ -77,12 +77,6 @@ export class DashboardComponent implements OnInit {
const fullHeight = window.innerHeight-30;
const request = new PlotRequest(
height,
width,
600, // thumbnailMaxWidth
500, // thumbnailMaxHeight
false, // keyOutside
false, // generateThumbnail
(<any>window).submitterId+crypto.randomUUID(),
plotWidget.config,
{

View File

@@ -1,6 +1,6 @@
import { Component, OnInit, Input, Output, ViewChild, EventEmitter } from '@angular/core';
import { MatLegacySnackBar as MatSnackBar } from '@angular/material/legacy-snack-bar';
import { PlotService, PlotRequest, PlotResponse, PlotResponseStats, DashTypeAndColor } from '../plot.service';
import { PlotService, PlotRequest, PlotResponse, PlotResponseStats, DashTypeAndColor, RenderedImages } from '../plot.service';
import { UtilService } from '../utils.service';
export class GalleryFilterData {
@@ -241,9 +241,7 @@ export class GalleryViewComponent implements OnInit {
this.submitterId = request.submitterId;
this.galleryItems.length = 0;
this.splitByValuesQueue.length = 0;
request.generateThumbnail = true;
this.plotService.splitQuery(request.config.query, splitByField).subscribe({
next: function(valuesForSplitBy){
console.log("valuesForSplitBy: " + JSON.stringify(valuesForSplitBy));
@@ -283,8 +281,8 @@ export class GalleryViewComponent implements OnInit {
that.progress = 100 * (that.totalNumberImages - that.splitByValuesQueue.length) / that.totalNumberImages;
plotResponse.thumbnailUrl = "//"+window.location.hostname+':'+window.location.port+'/'+plotResponse.rendered['thumbnail'];
plotResponse.imageUrl = "//"+window.location.hostname+':'+window.location.port+'/'+plotResponse.rendered['main'];
//plotResponse.thumbnailUrl = "//"+window.location.hostname+':'+window.location.port+'/'+plotResponse.rendered['thumbnail'];
//plotResponse.imageUrl = "//"+window.location.hostname+':'+window.location.port+'/'+plotResponse.rendered['main'];
let galleryItem = new GalleryItem(splitByValue, plotResponse);
that.galleryItems.push(galleryItem);
that.sortAndFilterGallery();
@@ -342,16 +340,16 @@ export class GalleryItemView {
export class GalleryItem {
thumbnailUrl: string;
imageUrl: string;
stats: PlotResponseStats;
splitByValue : string;
imageUrl: string;
thumbnailUrl :string;
show : boolean = false;
constructor(splitByValue: string, plotResponse: PlotResponse){
this.thumbnailUrl = plotResponse.thumbnailUrl;
this.imageUrl = plotResponse.imageUrl;
this.splitByValue = splitByValue;
this.stats = plotResponse.stats;
this.thumbnailUrl = "//"+window.location.hostname+':'+window.location.port+'/'+plotResponse.rendered['thumbnail'];
this.imageUrl = "//"+window.location.hostname+':'+window.location.port+'/'+plotResponse.rendered['main'];
}
}

View File

@@ -275,12 +275,6 @@ export class PlotViewComponent implements OnInit {
const actualDimension = typeof dimension === "function" ? dimension() : dimension;
const request = new PlotRequest(
actualDimension.height,
actualDimension.width,
300, // thumbnailMaxWidth
200, // thumbnailMaxHeight
false, // keyOutside
false, // generateThumbnail
(<any>window).submitterId,
this.config!,
{

View File

@@ -215,12 +215,6 @@ export type RenderedImages = {
export class PlotRequest {
constructor(
public height : number,
public width : number,
public thumbnailMaxWidth : number = 300,
public thumbnailMaxHeight : number = 200,
public keyOutside : boolean = false,
public generateThumbnail : boolean,
public submitterId: string,
public config: PlotConfig,
public renders: RenderOptionsMap
@@ -264,9 +258,7 @@ export class YAxisDefinition {
export class PlotResponse {
constructor(
public imageUrl : string,
public stats : PlotResponseStats,
public thumbnailUrl : string,
public rendered: RenderedImages){}
}

View File

@@ -198,12 +198,6 @@ export class VisualizationPageComponent implements OnInit {
};
const request = new PlotRequest(
results != null ? results.offsetHeight-1: 1024,
results != null ? results.offsetWidth-1 : 1024,
300, // thumbnailMaxWidth
200, // thumbnailMaxHeight
false, // keyOutside
this.enableGallery, // generateThumbnail
(<any>window).submitterId,
config,
renderOptions