Skip to content

Commit

Permalink
Merge pull request #30 from ijasonyi/master
Browse files Browse the repository at this point in the history
bug fix: 实时坐标显示,防止移动时窗口弹到下方
  • Loading branch information
codeskyblue authored Apr 1, 2017
2 parents 1a880b4 + 59966e2 commit 8b372ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion atxweb/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ <h4>Screen<span style="font-size:10px">(${resolution.displayMessage})</span>
<button v-if="device.refreshing" type="button" class="btn btn-default btn-xs" disabled="disabled">获取设备列表中..</button>
<template v-else>
<button v-if="choosing" type="button" class="btn btn-default btn-xs" @click="openChooseDevice">刷新设备</button>
<button v-else type="button" class="btn btn-default btn-xs" @click="openChooseDevice">切换设备</button>
<button v-else type="button" class="btn btn-default btn-xs" @click="openChooseDevice">切换</button>
</template>
<button type="button" class="btn btn-default btn-xs" @click="refreshScreen" v-bind:disabled="refreshing || autorefresh">刷新</button>
<input style="display:inline;" type="checkbox" class="checkbox" @click="checkAutoRefreshScreen($event)" title="自动刷新">
Expand Down
6 changes: 6 additions & 0 deletions atxweb/static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,12 @@ $(function() {
if (evt.movementX == 0 && evt.movementY == 0) {
return;
}
if (vm.resolution.imgWidth == 0 || vm.resolution.imgHeight ==0) {
return;
}
vm.resolution.positionX = Math.floor(evt.offsetX*vm.resolution.imgWidth/this.width);
vm.resolution.positionY = Math.floor(evt.offsetY*vm.resolution.imgHeight/this.height);

if (crop_bounds.start == null && crop_rect_bounds.start == null) {
return;
}
Expand Down

0 comments on commit 8b372ec

Please sign in to comment.