mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
spectrum modification : add position information top container
This commit is contained in:
parent
8cf588b26d
commit
167adaceb0
@ -824,13 +824,21 @@
|
||||
var offset = input.offset();
|
||||
offset.top += inputHeight;
|
||||
|
||||
offset.left -=
|
||||
Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
|
||||
Math.abs(offset.left + dpWidth - viewWidth) : 0);
|
||||
if (Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth))) {
|
||||
offset.left -= Math.abs(offset.left + dpWidth - viewWidth);
|
||||
picker.attr('data-x-position','right');
|
||||
} else {
|
||||
offset.left -= 0;
|
||||
picker.attr('data-x-position','left');
|
||||
}
|
||||
|
||||
offset.top -=
|
||||
Math.min(offset.top, ((offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
|
||||
Math.abs(dpHeight + inputHeight - extraY) : extraY));
|
||||
if (Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight))) {
|
||||
offset.top -= Math.abs(dpHeight + inputHeight - extraY);
|
||||
picker.attr('data-y-position','top');
|
||||
} else {
|
||||
offset.top -= extraY;
|
||||
picker.attr('data-y-position','bottom');
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user