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
So I have a project I am working on that uses reveal.js. Reveal automatically applies a scaling transform to the whole slide for responsiveness.
Using dragdealer inside a slide results in an ever increasing deviation in the handle away from your mouse location when dragging from the start position.
I don't have too much js experience but I've put together a quick hack for my particular issue, which may help explain this if my explanation above isn't as clear as I thought it was.
renderHandlePosition: function() {
var transform = '';
if (this.options.css3 && StylePrefix.transform) {
if (this.options.horizontal) {
console.log(typeof this.offset.current[0]);
transform += 'translateX(' + (this.offset.current[0] / 0.817006) + 'px)'; // Divide by scaling value to get correct offset.
}
if (this.options.vertical) {
transform += ' translateY(' + this.offset.current[1] + 'px)';
}
this.handle.style[StylePrefix.transform] = transform;
return;
}
if (this.options.horizontal) {
this.handle.style.left = this.offset.current[0] + 'px';
}
if (this.options.vertical) {
this.handle.style.top = this.offset.current[1] + 'px';
}
}
UPDATE Apparently this messes up the bounds and makes the handle able to extend out from the right boundary. Back to square one.
The text was updated successfully, but these errors were encountered:
So I have a project I am working on that uses reveal.js. Reveal automatically applies a scaling transform to the whole slide for responsiveness.
Using dragdealer inside a slide results in an ever increasing deviation in the handle away from your mouse location when dragging from the start position.
I don't have too much js experience but I've put together a quick hack for my particular issue, which may help explain this if my explanation above isn't as clear as I thought it was.
UPDATE Apparently this messes up the bounds and makes the handle able to extend out from the right boundary. Back to square one.
The text was updated successfully, but these errors were encountered: