Skip to content

Commit 94ecc89

Browse files
author
Graham Butler
committed
version bump
1 parent e9a9856 commit 94ecc89

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@author.io/element-slider-handle",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "author-slider-handle custom element (web component).",
55
"main": "dist/author-slider-handle.min.js",
66
"scripts": {

src/element.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ class AuthorSliderHandleElement extends AuthorBaseElement(HTMLElement) {
1616
return
1717
}
1818

19-
this.UTIL.setStyleProperty('positionRule', 'left', `${x.pct * 100}%`)
20-
this.UTIL.setStyleProperty('positionRule', 'top', `${y.pct * 100}%`)
19+
if (x) {
20+
this.UTIL.setStyleProperty('positionRule', 'left', `${x.pct * 100}%`)
21+
}
22+
23+
if (y) {
24+
this.UTIL.setStyleProperty('positionRule', 'top', `${y.pct * 100}%`)
25+
}
2126
}
2227
}
2328

0 commit comments

Comments
 (0)