Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default color/style #1074

Merged
merged 4 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions common/DrawHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
7 changes: 5 additions & 2 deletions core/extension/openseadragon-overlays-manage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -907,4 +910,4 @@



})(OpenSeadragon)
})(OpenSeadragon)
Loading