Skip to content
Snippets Groups Projects
Commit 351e306d authored by Manuel Leduc's avatar Manuel Leduc
Browse files

XWIKI-22009: Images can be resized by mouse dragging although the Size is...

XWIKI-22009: Images can be resized by mouse dragging although the Size is marked as not adjustable on a default Image Style that is forced

(cherry picked from commit 46fa0f58)
parent a672e89e
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,19 @@
}, function () {
console.debug("Failed to resolve image style [" + styleId + "]");
});
} else {
// In case of empty imageStyle, check if this is because the default style is forced.
// In this case, allow resizing according to the default style configuration.
imageStyleClient.loadImageStylesDefault().then((defaultStyle) => {
if (defaultStyle.forceDefaultStyle === "true") {
imageStyleClient.loadImageStyles().then((values) => {
var forcedStyle = values.imageStyles.filter((style) => style.identifier === defaultStyle.defaultStyle)[0];
if (forcedStyle.adjustableSize === false) {
widget.resizer.addClass('hidden');
}
});
}
});
}
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment