Commit f9996ccc by 李萌萌

全部案件库的缩略图移动范围修改

parent f2ac879e
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-22 11:36:10 * @Date: 2021-10-22 11:36:10
* @LastEditTime: 2022-01-18 15:52:01 * @LastEditTime: 2022-01-18 17:23:00
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue * @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
...@@ -8077,7 +8077,9 @@ export default { ...@@ -8077,7 +8077,9 @@ export default {
s = o.style, s = o.style,
x, x,
y, y,
p = "onmousemove"; p = "onmousemove",
// 小蓝框拖拽的最小边界值(像素)
miniPix=10;
self.dragableDiv = o self.dragableDiv = o
o.onmousedown = function (e) { o.onmousedown = function (e) {
e.stopPropagation() e.stopPropagation()
...@@ -8089,8 +8091,23 @@ export default { ...@@ -8089,8 +8091,23 @@ export default {
o[p] = function (e) { o[p] = function (e) {
e.stopPropagation() e.stopPropagation()
e = e || event; e = e || event;
s.left = e.clientX - self.x + "px"; // 判断小蓝框的位置
s.top = e.clientY - self.y + "px"; let left=e.clientX - self.x;
let top=e.clientY - self.y;
if(left>=$(".preview-source").width()-miniPix){
left=$(".preview-source").width()-miniPix
}else if(left<=-$("#block_small").width()+miniPix){
left=-$("#block_small").width()+miniPix
}
if(top>=$(".preview-source").height()-miniPix){
top=$(".preview-source").height()-miniPix
}else if(top<=-$("#block_small").height()+miniPix){
top=-$("#block_small").height()+miniPix
}
s.left = left + "px";
s.top = top + "px";
// 存下小指纹框当前的位置 // 存下小指纹框当前的位置
// self.small_x = e.clientX - self.x; // self.small_x = e.clientX - self.x;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment