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

Update jquery.imgareaselect.dev.js #69

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eliyahen1
Copy link

#39

It seems that the position of $outer parts are set to fixed when any of the IMG parents is fixed. This is true when you refer relatively to the body element.
But, if you set parent to an explicit element, and no fixed position is in between IMG element and parent element - the position of $outer should be 'absolute'.

Problem is, you determine and set the $outer position before you setSettings. So, the solution is to re-set it after you set options.

I ended up with this change:
In imgLoad function:
$box.add($outer).css({ visibility: '' , position: ($parent[0].tagName !== 'BODY'? 'absolute' : undefined) });

odyniec#39

It seems that the position of $outer parts are set to fixed when any of the IMG parents is fixed. This is true when you refer relatively to the body element.
But, if you set parent to an explicit element, and no fixed position is in between IMG element and parent element - the position of $outer should be 'absolute'.

Problem is, you determine and set the $outer position before you setSettings. So, the solution is to re-set it after you set options.

I ended up with this change:
In imgLoad function:
$box.add($outer).css({ visibility: '' , position: ($parent[0].tagName !== 'BODY'? 'absolute' : undefined) });
Bug Fixed: When minWidth / minHeight are greater than image size, the selection area is rendered out of the image.
Fix: Make sure the selection area is always inside the image boundaries (imageWidth & imageHeight must be defined).
Added options:
- disableCancelSelection: boolean (defaults: undefined/false), whether to disable cancel selection (selection is never hidden).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant