diff --git a/common/DrawHelper.js b/common/DrawHelper.js index bf83de4d8..a68132b87 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 = {"color":"#FF6926"}; } - const style = polygon.properties.style; // if there is path using path to draw // if(polygon.geometry.path){ diff --git a/core/extension/openseadragon-overlays-manage.js b/core/extension/openseadragon-overlays-manage.js index 889cb4400..9a20a779c 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)