Skip to content

Commit

Permalink
Fix for Solid color scheme not loading #689
Browse files Browse the repository at this point in the history
  • Loading branch information
okg21 committed Jun 10, 2024
1 parent cfe57f2 commit 6c41eeb
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions app/js/app-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -2489,24 +2489,12 @@ appUtilities.getActionsToApplyMapColorScheme = function(newColorScheme, scheme_t

// first clear the background images of already present elements
actions.push({name: "changeData", param: {eles: eles, name: 'background-image', valueMap: mapIdToValue(eles, '')}});
actions.push({name: "changeData", param: {eles: eles, name: 'background-fit', valueMap: mapIdToValue(eles, '')}});
actions.push({name: "changeData", param: {eles: eles, name: 'background-position-x', valueMap: mapIdToValue(eles, '')}});
actions.push({name: "changeData", param: {eles: eles, name: 'background-position-y', valueMap: mapIdToValue(eles, '')}});
actions.push({name: "changeData", param: {eles: eles, name: 'background-width', valueMap: mapIdToValue(eles, '')}});
actions.push({name: "changeData", param: {eles: eles, name: 'background-height', valueMap: mapIdToValue(eles, '')}});
actions.push({name: "changeData", param: {eles: eles, name: 'background-image-opacity', valueMap: mapIdToValue(eles, '')}});

// edit style of the current map elements, in solid scheme just change background-color
actions.push({name: "changeData", param: {eles: eles, name: 'background-color', valueMap: idMap}});

// first clear the background images of already present collapsed elements
actions.push({name: "changeDataDirty", param: {eles: collapsedChildren, name: 'background-image', valueMap: mapIdToValue(collapsedChildren, '')}});
actions.push({name: "changeDataDirty", param: {eles: collapsedChildren, name: 'background-fit', valueMap: mapIdToValue(collapsedChildren, '')}});
actions.push({name: "changeDataDirty", param: {eles: collapsedChildren, name: 'background-position-x', valueMap: mapIdToValue(collapsedChildren, '')}});
actions.push({name: "changeDataDirty", param: {eles: collapsedChildren, name: 'background-position-y', valueMap: mapIdToValue(collapsedChildren, '')}});
actions.push({name: "changeDataDirty", param: {eles: collapsedChildren, name: 'background-width', valueMap: mapIdToValue(collapsedChildren, '')}});
actions.push({name: "changeDataDirty", param: {eles: collapsedChildren, name: 'background-height', valueMap: mapIdToValue(collapsedChildren, '')}});
actions.push({name: "changeDataDirty", param: {eles: collapsedChildren, name: 'background-image-opacity', valueMap: mapIdToValue(collapsedChildren, '')}});

// collapsed nodes' style should also be changed, special edge case
actions.push({name: "changeDataDirty", param: {eles: collapsedChildren, name: 'background-color', valueMap: collapsedIdMap}});
Expand Down

1 comment on commit 6c41eeb

@okg21
Copy link
Author

@okg21 okg21 commented on 6c41eeb Jun 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May need further testing, due to removal of some code which was introduced as a bug fix for the following bugs in issue #574 :

  • [] When you change the color scheme (using a background image) for unspecified entity or perturbing agent with a background image, you see the entire background painted as clone marker:
    ezgif com-gif-maker (1)

  • [] With the above example, undo takes 2 tries to get it undone (not just 1)

Originally posted by @ugurdogrusoz in #574 (comment)

Please sign in to comment.