Fix draggable

This commit is contained in:
codebicycle
2017-02-06 11:43:03 +02:00
parent 10e2c08e82
commit 54f892dacf
2 changed files with 4 additions and 1 deletions

View File

@@ -320,7 +320,7 @@ chrome.runtime.sendMessage({}, function(response) {
function handleDrag(video, controller) {
const parentElement = controller.parentElement,
boundRect = parentElement.getBoundingClientRect(),
shadowController = controller.shadowRoot.querySelector('#controller'),
shadowController = controller.querySelector('#controller'),
drag = shadowController.querySelector('.draggable'),
offsetLeft = boundRect.left + drag.offsetLeft + drag.offsetWidth,
offsetTop = boundRect.top + drag.offsetTop + drag.offsetHeight;

View File

@@ -39,6 +39,7 @@
.vsc-controller #controller.dragging {
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
opacity: 0.7;
}
@@ -48,10 +49,12 @@
.vsc-controller .draggable {
cursor: -webkit-grab;
cursor: -moz-grab;
}
.vsc-controller .draggable:active {
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
}
.vsc-controller button {