From ed6f11ccb3ea539d943af70953a0b77610197b13 Mon Sep 17 00:00:00 2001 From: Birm Date: Wed, 15 Jan 2025 14:52:48 -0500 Subject: [PATCH 1/4] Update DrawHelper.js --- common/DrawHelper.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/DrawHelper.js b/common/DrawHelper.js index bf83de4d..a74514cc 100644 --- a/common/DrawHelper.js +++ b/common/DrawHelper.js @@ -192,9 +192,12 @@ caDrawHelper.prototype.draw = function(ctx, image_data){ for (let i = 0; i < image_data.length; i++) { const polygon = image_data[i]; if (polygon.properties == undefined || polygon.properties == null){ - polygon.properties = {} + polygon.properties = {}; + } + let style = polygon.properties.style; + if (style == undefined || style == null){ + style = {}; } - const style = polygon.properties.style; // if there is path using path to draw // if(polygon.geometry.path){ From f0dc6ba433a24cbc717c2d76fa85054fb04e4f1b Mon Sep 17 00:00:00 2001 From: Birm Date: Wed, 15 Jan 2025 14:54:48 -0500 Subject: [PATCH 2/4] Update DrawHelper.js --- common/DrawHelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/DrawHelper.js b/common/DrawHelper.js index a74514cc..a68132b8 100644 --- a/common/DrawHelper.js +++ b/common/DrawHelper.js @@ -196,7 +196,7 @@ caDrawHelper.prototype.draw = function(ctx, image_data){ } let style = polygon.properties.style; if (style == undefined || style == null){ - style = {}; + style = {"color":"#FF6926"}; } // if there is path using path to draw From 787e7459bd28c9389f355d595a02c2e4a0aab4ff Mon Sep 17 00:00:00 2001 From: Birm Date: Wed, 15 Jan 2025 14:58:45 -0500 Subject: [PATCH 3/4] default color style --- core/extension/openseadragon-overlays-manage.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/extension/openseadragon-overlays-manage.js b/core/extension/openseadragon-overlays-manage.js index 889cb440..91c93e6b 100644 --- a/core/extension/openseadragon-overlays-manage.js +++ b/core/extension/openseadragon-overlays-manage.js @@ -265,7 +265,10 @@ if($.isArray(layer.data)){ for(let j = 0;j < layer.data.length;j++){ const path = layer.data[j].geometry.path; - const style = layer.data[j].properties.style; + let style = layer.data[j].properties.style; + if (style == undefined || style == null){ + style = {"color": "#FF6296") + } const pathData = layer.data[j]; if(layer.hoverable&&path.contains(img_point.x,img_point.y)){ this.resize(); @@ -907,4 +910,4 @@ -})(OpenSeadragon) \ No newline at end of file +})(OpenSeadragon) From 2afcd5283671945b6264db8a7ae096fa1c4a0e8f Mon Sep 17 00:00:00 2001 From: Birm Date: Wed, 15 Jan 2025 14:59:45 -0500 Subject: [PATCH 4/4] typo fix def color --- core/extension/openseadragon-overlays-manage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/extension/openseadragon-overlays-manage.js b/core/extension/openseadragon-overlays-manage.js index 91c93e6b..9a20a779 100644 --- a/core/extension/openseadragon-overlays-manage.js +++ b/core/extension/openseadragon-overlays-manage.js @@ -267,7 +267,7 @@ const path = layer.data[j].geometry.path; let style = layer.data[j].properties.style; if (style == undefined || style == null){ - style = {"color": "#FF6296") + style = {"color": "#FF6296"}; } const pathData = layer.data[j]; if(layer.hoverable&&path.contains(img_point.x,img_point.y)){