update 0.11.5
This commit is contained in:
@@ -5,6 +5,9 @@ nav:
|
||||
title: change log
|
||||
order: 6
|
||||
---
|
||||
## 0.11.5
|
||||
Fix reference line adsorption and wrong displacement bug
|
||||
Change the position of the rotation justification
|
||||
## 0.11.4
|
||||
Fix guide line bug
|
||||
Optimized drag and drop algorithm
|
||||
|
@@ -6,6 +6,12 @@ nav:
|
||||
order: 6
|
||||
---
|
||||
|
||||
## 0.11.5
|
||||
|
||||
修复参考线吸附与错误位移bug
|
||||
|
||||
修改旋转回正的位置
|
||||
|
||||
## 0.11.4
|
||||
|
||||
修复参考线bug
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "0.11.4",
|
||||
"version": "0.11.5",
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/dooringx-lib.esm.js",
|
||||
|
@@ -176,7 +176,6 @@ export function marklineCalRender(config: UserConfig, iframe: boolean): LinesTyp
|
||||
'r-l'
|
||||
);
|
||||
}
|
||||
|
||||
const indexTopBottom = binarySearchRemain<RealStyleType>(
|
||||
realStyle.top,
|
||||
marklineState.sortBottom,
|
||||
|
@@ -32,97 +32,96 @@ export function marklineDisplay(
|
||||
direction: 'left' | 'top' | 'bottom' | 'right' | 't-b' | 'b-t' | 'l-r' | 'r-l'
|
||||
) {
|
||||
const { top, height, left, width } = focusStyle;
|
||||
let { dirtyX, dirtyY } = dirty;
|
||||
const { top: t, height: h, left: l, width: w } = unFocusStyle;
|
||||
let diffY = 0;
|
||||
let diffX = 0;
|
||||
switch (direction) {
|
||||
case 'left':
|
||||
if (dirtyY) {
|
||||
if (diff === 0) {
|
||||
if (dirty.dirtyY) {
|
||||
if (diff <= 1) {
|
||||
lines.y.push(l);
|
||||
}
|
||||
} else {
|
||||
lines.y.push(l);
|
||||
diffX = l - left;
|
||||
dirtyY = true;
|
||||
dirty.dirtyY = true;
|
||||
}
|
||||
break;
|
||||
case 'right':
|
||||
if (dirtyY) {
|
||||
if (diff === 0) {
|
||||
if (dirty.dirtyY) {
|
||||
if (diff <= 1) {
|
||||
lines.y.push(l + w);
|
||||
}
|
||||
} else {
|
||||
lines.y.push(l + w);
|
||||
diffX = l + w - left - width;
|
||||
dirtyY = true;
|
||||
dirty.dirtyY = true;
|
||||
}
|
||||
break;
|
||||
case 'l-r':
|
||||
if (dirtyY) {
|
||||
if (diff === 0) {
|
||||
if (dirty.dirtyY) {
|
||||
if (diff <= 1) {
|
||||
lines.y.push(l + w);
|
||||
}
|
||||
} else {
|
||||
lines.y.push(l + w);
|
||||
diffX = l + w - left;
|
||||
dirtyY = true;
|
||||
dirty.dirtyY = true;
|
||||
}
|
||||
break;
|
||||
case 'r-l':
|
||||
if (dirtyY) {
|
||||
if (diff === 0) {
|
||||
if (dirty.dirtyY) {
|
||||
if (diff <= 1) {
|
||||
lines.y.push(l);
|
||||
}
|
||||
} else {
|
||||
lines.y.push(l);
|
||||
diffX = l - (left + width);
|
||||
dirtyY = true;
|
||||
dirty.dirtyY = true;
|
||||
}
|
||||
break;
|
||||
case 'top':
|
||||
if (dirtyX) {
|
||||
if (diff === 0) {
|
||||
if (dirty.dirtyX) {
|
||||
if (diff <= 1) {
|
||||
lines.x.push(t);
|
||||
}
|
||||
} else {
|
||||
lines.x.push(t);
|
||||
diffY = t - top;
|
||||
dirtyX = true;
|
||||
dirty.dirtyX = true;
|
||||
}
|
||||
break;
|
||||
case 'bottom':
|
||||
if (dirtyX) {
|
||||
if (diff === 0) {
|
||||
if (dirty.dirtyX) {
|
||||
if (diff <= 1) {
|
||||
lines.x.push(t + h);
|
||||
}
|
||||
} else {
|
||||
lines.x.push(t + h);
|
||||
diffY = (t + h - top - height) / 2;
|
||||
dirtyX = true;
|
||||
diffY = t + h - top - height;
|
||||
dirty.dirtyX = true;
|
||||
}
|
||||
break;
|
||||
case 't-b':
|
||||
if (dirtyX) {
|
||||
if (diff === 0) {
|
||||
if (dirty.dirtyX) {
|
||||
if (diff <= 1) {
|
||||
lines.x.push(t + h);
|
||||
}
|
||||
} else {
|
||||
lines.x.push(t + h);
|
||||
diffY = (t + h - top) / 2;
|
||||
dirtyX = true;
|
||||
diffY = t + h - top;
|
||||
dirty.dirtyX = true;
|
||||
}
|
||||
break;
|
||||
case 'b-t':
|
||||
if (dirtyX) {
|
||||
if (diff === 0) {
|
||||
if (dirty.dirtyX) {
|
||||
if (diff <= 1) {
|
||||
lines.x.push(t);
|
||||
}
|
||||
} else {
|
||||
lines.x.push(t);
|
||||
diffY = t - (top + height);
|
||||
dirtyX = true;
|
||||
dirty.dirtyX = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -206,8 +206,8 @@
|
||||
}
|
||||
.rotatereset {
|
||||
position: absolute;
|
||||
top: -35px;
|
||||
left: calc(100% - 15px);
|
||||
top: -20px;
|
||||
left: calc(100% + 15px);
|
||||
cursor: pointer;
|
||||
font-size: 20px;
|
||||
color: gray;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dooringx-plugin-template",
|
||||
"version": "0.11.4",
|
||||
"version": "0.11.5",
|
||||
"description": "> TODO: description",
|
||||
"author": "yehuozhili <673632758@qq.com>",
|
||||
"homepage": "https://github.com/H5-Dooring/dooringx#readme",
|
||||
|
@@ -40,7 +40,7 @@
|
||||
"@rollup/plugin-node-resolve": "^13.0.4",
|
||||
"@rollup/plugin-url": "^6.1.0",
|
||||
"@svgr/rollup": "^5.5.0",
|
||||
"dooringx-lib": "^0.11.4",
|
||||
"dooringx-lib": "^0.11.5",
|
||||
"postcss": "^8.3.6",
|
||||
"rollup-plugin-peer-deps-external": "^2.2.4",
|
||||
"rollup-plugin-postcss": "^4.0.1",
|
||||
|
Reference in New Issue
Block a user