Skip to content

Commit c5f6283

Browse files
committed
Added ColorPicker position adjustment
1 parent 51bcaca commit c5f6283

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

j-ColorPicker/component.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ COMPONENT('colorpicker', function(self, config, cls) {
130130
css.top += opt.offsetY;
131131

132132
is = true;
133+
134+
if (css.top + self.element.height() > window.innerHeight)
135+
css.top = (css.top + self.element.height()) - window.innerHeight;
136+
133137
self.element.css(css);
134138
setTimeout(self.bindevents, 10);
135139
};

j-ColorPicker/component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"datecreated": "2019-03-25T13:47:01.000Z",
3-
"dateupdated": "2023-01-23T11:00:01.000Z",
3+
"dateupdated": "2023-03-15T08:58:19.000Z",
44
"name": "j-ColorPicker",
55
"tags": [
66
"colors",

0 commit comments

Comments
 (0)