update 0.11.6
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
## 0.11.6
|
||||||
|
|
||||||
|
取消第一次点击鼠标的吸附。
|
||||||
|
|
||||||
|
修改timeline选中颜色。
|
||||||
|
|
||||||
## 0.11.5
|
## 0.11.5
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
"pub": "node ./script/publish.js",
|
"pub": "node ./script/publish.js",
|
||||||
"changelog": "node ./script/changelog.js",
|
"changelog": "node ./script/changelog.js",
|
||||||
"translate": "node ./script/translate.js",
|
"translate": "node ./script/translate.js",
|
||||||
"translateText":"node ./script/translateText.js"
|
"translateText": "node ./script/translateText.js"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -39,5 +39,6 @@
|
|||||||
"npx prettier --write ./packages/dooringx-dumi-doc/docs ./packages/dooringx-lib/src",
|
"npx prettier --write ./packages/dooringx-dumi-doc/docs ./packages/dooringx-lib/src",
|
||||||
"git add ."
|
"git add ."
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"dependencies": {}
|
||||||
}
|
}
|
||||||
|
@@ -5,6 +5,9 @@ nav:
|
|||||||
title: change log
|
title: change log
|
||||||
order: 6
|
order: 6
|
||||||
---
|
---
|
||||||
|
## 0.11.6
|
||||||
|
Cancel the first mouse click.
|
||||||
|
Modify the selected color of timeline.
|
||||||
## 0.11.5
|
## 0.11.5
|
||||||
Fix reference line adsorption and wrong displacement bug
|
Fix reference line adsorption and wrong displacement bug
|
||||||
Change the position of the rotation justification
|
Change the position of the rotation justification
|
||||||
|
@@ -5,6 +5,11 @@ nav:
|
|||||||
title: 变更日志
|
title: 变更日志
|
||||||
order: 6
|
order: 6
|
||||||
---
|
---
|
||||||
|
## 0.11.6
|
||||||
|
|
||||||
|
取消第一次点击鼠标的吸附。
|
||||||
|
|
||||||
|
修改timeline选中颜色。
|
||||||
|
|
||||||
## 0.11.5
|
## 0.11.5
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "0.11.5",
|
"version": "0.11.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "dist/dooringx-lib.esm.js",
|
"module": "dist/dooringx-lib.esm.js",
|
||||||
|
@@ -80,7 +80,7 @@ const SortableItem = SortableElement(
|
|||||||
minWidth: leftWidth,
|
minWidth: leftWidth,
|
||||||
borderRight: borderColor,
|
borderRight: borderColor,
|
||||||
borderBottom: borderColor,
|
borderBottom: borderColor,
|
||||||
backgroundColor: value.value.focus ? 'rgb(118 118 118)' : 'initial',
|
backgroundColor: value.value.focus ? '#76767680' : 'initial',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@@ -259,7 +259,7 @@ export function marklineCalRender(config: UserConfig, iframe: boolean): LinesTyp
|
|||||||
} else {
|
} else {
|
||||||
marklineState.cache[v.id] = rstyle;
|
marklineState.cache[v.id] = rstyle;
|
||||||
}
|
}
|
||||||
newMarklineDisplay(realStyle, rstyle, lines, focus);
|
newMarklineDisplay(realStyle, rstyle, lines);
|
||||||
// if (lines.x.length !== 0 || lines.y.length !== 0) {
|
// if (lines.x.length !== 0 || lines.y.length !== 0) {
|
||||||
// break; 这里不能break要算完所有值
|
// break; 这里不能break要算完所有值
|
||||||
// }
|
// }
|
||||||
|
@@ -141,106 +141,43 @@ export function marklineDisplay(
|
|||||||
export function newMarklineDisplay(
|
export function newMarklineDisplay(
|
||||||
focusStyle: RealStyle,
|
focusStyle: RealStyle,
|
||||||
unFocusStyle: RealStyle,
|
unFocusStyle: RealStyle,
|
||||||
lines: LinesTypes,
|
lines: LinesTypes
|
||||||
focus: IBlockType
|
|
||||||
) {
|
) {
|
||||||
const { top, height, left, width } = focusStyle;
|
const { top, height, left, width } = focusStyle;
|
||||||
const { top: t, height: h, left: l, width: w } = unFocusStyle;
|
const { top: t, height: h, left: l, width: w } = unFocusStyle;
|
||||||
let diffY = 0;
|
|
||||||
// 头对头
|
// 头对头
|
||||||
if (Math.abs(t - top) < marklineConfig.indent) {
|
if (Math.abs(t - top) <= 1) {
|
||||||
lines.x.push(t);
|
lines.x.push(t);
|
||||||
diffY = t - top;
|
|
||||||
}
|
|
||||||
// 中对头
|
|
||||||
else if (Math.abs(t - (top + height / 2)) < marklineConfig.indent) {
|
|
||||||
lines.x.push(t);
|
|
||||||
diffY = t - (top + height / 2);
|
|
||||||
}
|
}
|
||||||
// 尾对头
|
// 尾对头
|
||||||
else if (Math.abs(t - (top + height)) < marklineConfig.indent) {
|
else if (Math.abs(t - (top + height)) <= 1) {
|
||||||
lines.x.push(t);
|
lines.x.push(t);
|
||||||
diffY = t - (top + height);
|
|
||||||
}
|
|
||||||
// 头对中
|
|
||||||
else if (Math.abs(t + h / 2 - top) < marklineConfig.indent) {
|
|
||||||
lines.x.push(t + h / 2);
|
|
||||||
diffY = t + h / 2 - top;
|
|
||||||
}
|
|
||||||
// 中对中
|
|
||||||
else if (Math.abs(t + h / 2 - top - height / 2) < marklineConfig.indent) {
|
|
||||||
lines.x.push(t + h / 2);
|
|
||||||
diffY = t + h / 2 - top - height / 2;
|
|
||||||
}
|
|
||||||
// 尾对中
|
|
||||||
else if (Math.abs(t + h / 2 - top - height) < marklineConfig.indent) {
|
|
||||||
lines.x.push(t + h / 2);
|
|
||||||
diffY = t + h / 2 - top - height;
|
|
||||||
}
|
}
|
||||||
// 头对尾
|
// 头对尾
|
||||||
else if (Math.abs((t + h - top) / 2) < marklineConfig.indent) {
|
else if (Math.abs((t + h - top) / 2) <= 1) {
|
||||||
lines.x.push(t + h);
|
lines.x.push(t + h);
|
||||||
diffY = (t + h - top) / 2;
|
|
||||||
}
|
|
||||||
// 中对尾
|
|
||||||
else if (Math.abs(t + h - top - height / 2) < marklineConfig.indent) {
|
|
||||||
lines.x.push(t + h);
|
|
||||||
diffY = t + h - top - height / 2;
|
|
||||||
}
|
}
|
||||||
// 尾对尾
|
// 尾对尾
|
||||||
else if (Math.abs((t + h - top - height) / 2) < marklineConfig.indent) {
|
else if (Math.abs((t + h - top - height) / 2) <= 1) {
|
||||||
lines.x.push(t + h);
|
lines.x.push(t + h);
|
||||||
diffY = (t + h - top - height) / 2;
|
|
||||||
}
|
}
|
||||||
focus.top = Math.round(focus.top + diffY);
|
|
||||||
// 纵线
|
// 纵线
|
||||||
// 头对头
|
// 头对头
|
||||||
let diffX = 0;
|
if (Math.abs(l - left) <= 1) {
|
||||||
if (Math.abs(l - left) < marklineConfig.indent) {
|
|
||||||
lines.y.push(l);
|
lines.y.push(l);
|
||||||
diffX = l - left;
|
|
||||||
}
|
|
||||||
// 中对头
|
|
||||||
else if (Math.abs(l - (left + width / 2)) < marklineConfig.indent) {
|
|
||||||
lines.y.push(l);
|
|
||||||
diffX = l - (left + width / 2);
|
|
||||||
}
|
}
|
||||||
// 尾对头
|
// 尾对头
|
||||||
else if (Math.abs(l - (left + width)) < marklineConfig.indent) {
|
else if (Math.abs(l - (left + width)) <= 1) {
|
||||||
lines.y.push(l);
|
lines.y.push(l);
|
||||||
diffX = l - (left + width);
|
|
||||||
}
|
|
||||||
// 头对中
|
|
||||||
else if (Math.abs(l + w / 2 - left) < marklineConfig.indent) {
|
|
||||||
lines.y.push(l + w / 2);
|
|
||||||
diffX = l + w / 2 - left;
|
|
||||||
}
|
|
||||||
// 中对中
|
|
||||||
else if (Math.abs(l + w / 2 - left - width / 2) < marklineConfig.indent) {
|
|
||||||
lines.y.push(l + w / 2);
|
|
||||||
diffX = l + w / 2 - left - width / 2;
|
|
||||||
}
|
|
||||||
// 尾对中
|
|
||||||
else if (Math.abs(l + w / 2 - left - width) < marklineConfig.indent) {
|
|
||||||
lines.y.push(l + w / 2);
|
|
||||||
diffX = l + w / 2 - left - width;
|
|
||||||
}
|
}
|
||||||
// 头对尾
|
// 头对尾
|
||||||
else if (Math.abs(l + w - left) < marklineConfig.indent) {
|
else if (Math.abs(l + w - left) <= 1) {
|
||||||
lines.y.push(l + w);
|
lines.y.push(l + w);
|
||||||
diffX = l + w - left;
|
|
||||||
}
|
|
||||||
// 中对尾
|
|
||||||
else if (Math.abs(l + w - left - width / 2) < marklineConfig.indent) {
|
|
||||||
lines.y.push(l + w);
|
|
||||||
diffX = l + w - left - width / 2;
|
|
||||||
}
|
}
|
||||||
// 尾对尾
|
// 尾对尾
|
||||||
else if (Math.abs(l + w - left - width) < marklineConfig.indent) {
|
else if (Math.abs(l + w - left - width) <= 1) {
|
||||||
lines.y.push(l + w);
|
lines.y.push(l + w);
|
||||||
diffX = l + w - left - width;
|
|
||||||
}
|
}
|
||||||
focus.left = Math.round(focus.left + diffX);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dooringx-plugin-template",
|
"name": "dooringx-plugin-template",
|
||||||
"version": "0.11.5",
|
"version": "0.11.6",
|
||||||
"description": "> TODO: description",
|
"description": "> TODO: description",
|
||||||
"author": "yehuozhili <673632758@qq.com>",
|
"author": "yehuozhili <673632758@qq.com>",
|
||||||
"homepage": "https://github.com/H5-Dooring/dooringx#readme",
|
"homepage": "https://github.com/H5-Dooring/dooringx#readme",
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
"@rollup/plugin-node-resolve": "^13.0.4",
|
"@rollup/plugin-node-resolve": "^13.0.4",
|
||||||
"@rollup/plugin-url": "^6.1.0",
|
"@rollup/plugin-url": "^6.1.0",
|
||||||
"@svgr/rollup": "^5.5.0",
|
"@svgr/rollup": "^5.5.0",
|
||||||
"dooringx-lib": "^0.11.5",
|
"dooringx-lib": "^0.11.6",
|
||||||
"postcss": "^8.3.6",
|
"postcss": "^8.3.6",
|
||||||
"rollup-plugin-peer-deps-external": "^2.2.4",
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
||||||
"rollup-plugin-postcss": "^4.0.1",
|
"rollup-plugin-postcss": "^4.0.1",
|
||||||
|
Reference in New Issue
Block a user