You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When applying CSS to the wrapper element of ImageMapster (e.g. via wrapClass, wrapCss, etc.) the highlight/select behavior of ImageMapster results in the wrong area being targeted based on the position of the image itself.
This is occurring because the canvas elements are absolutely positioned at left: 0, top: 0 and do not account for padding that can be applied via CSS to the wrapper.
Notice that the highlight is 20px to the left and up from where it should be
Expected behavior
The highlight/select should be positioned in the correct location that is reflected in the image itself based on its position
Screenshots
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
N/A
Additional context
The canvas_style internal variable is hardcoded to absolute/0/0 and either needs to dynamically be adjusted at runtime to account for padding, etc. or made as a configuration option such that there is a way for the user to specify adjustments to correspond to the CSS they are applying to the wrapper.
The text was updated successfully, but these errors were encountered:
techfg
changed the title
Area highlight/select is wrong location when css applied to wrapper
Area highlight/select in wrong location when css applied to wrapper
Jan 29, 2021
Describe the bug
When applying CSS to the wrapper element of ImageMapster (e.g. via wrapClass, wrapCss, etc.) the highlight/select behavior of ImageMapster results in the wrong area being targeted based on the position of the image itself.
This is occurring because the canvas elements are absolutely positioned at left: 0, top: 0 and do not account for padding that can be applied via CSS to the wrapper.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The highlight/select should be positioned in the correct location that is reflected in the image itself based on its position
Screenshots
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
N/A
Additional context
The
canvas_style
internal variable is hardcoded to absolute/0/0 and either needs to dynamically be adjusted at runtime to account for padding, etc. or made as a configuration option such that there is a way for the user to specify adjustments to correspond to the CSS they are applying to the wrapper.The text was updated successfully, but these errors were encountered: