Minor.
This commit is contained in:
parent
4a3e8c6734
commit
f547d95f30
2 changed files with 2 additions and 3 deletions
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue