This commit is contained in:
Lars Jung 2016-06-29 22:06:43 +02:00
parent 4a3e8c6734
commit f547d95f30
2 changed files with 2 additions and 3 deletions

View file

@ -21,7 +21,7 @@ const tplOverlay =
<li id="pv-bar-raw" class="bar-right"><a class="bar-button" target="_blank"><img src="${resource.image('preview-raw')}"/></a></li>
<li id="pv-bar-fullscreen" class="bar-right bar-button"><img src="${resource.image('preview-fullscreen')}"/></li>
<li id="pv-bar-next" class="bar-right bar-button"><img src="${resource.image('preview-next')}"/></li>
<li id="pv-bar-idx" class="bar-right bar-label"/>
<li id="pv-bar-idx" class="bar-right bar-label"></li>
<li id="pv-bar-prev" class="bar-right bar-button"><img src="${resource.image('preview-prev')}"/></li>
</ul>
</div>

View file

@ -24,7 +24,6 @@ const mabs = Math.abs;
let dragStartX = 0;
let dragStartY = 0;
let isCtrlPressed = false;
const publish = () => {
@ -76,6 +75,7 @@ const selectionUpdate = ev => {
const top = mmin(dragStartY, ev.pageY);
const width = mabs(dragStartX - ev.pageX);
const height = mabs(dragStartY - ev.pageY);
const isCtrlPressed = ev.ctrlKey || ev.metaKey;
if (!isCtrlPressed && width < 4 && height < 4) {
return;
@ -127,7 +127,6 @@ const selectionStart = ev => {
return;
}
isCtrlPressed = ev.ctrlKey || ev.metaKey;
dragStartX = ev.pageX;
dragStartY = ev.pageY;