update 0.11.7

This commit is contained in:
hufeixiong
2022-01-12 09:22:31 +08:00
parent 72ea563070
commit 07f5dc1bb4
7 changed files with 142 additions and 131 deletions

View File

@@ -1,3 +1,6 @@
## 0.11.7
取消多选吸附功能。
## 0.11.6 ## 0.11.6
取消第一次点击鼠标的吸附。 取消第一次点击鼠标的吸附。

View File

@@ -5,6 +5,8 @@ nav:
title: change log title: change log
order: 6 order: 6
--- ---
## 0.11.7
Cancel the multi selection adsorption function.
## 0.11.6 ## 0.11.6
Cancel the first mouse click. Cancel the first mouse click.
Modify the selected color of timeline. Modify the selected color of timeline.

View File

@@ -5,6 +5,9 @@ nav:
title: 变更日志 title: 变更日志
order: 6 order: 6
--- ---
## 0.11.7
取消多选吸附功能。
## 0.11.6 ## 0.11.6
取消第一次点击鼠标的吸附。 取消第一次点击鼠标的吸附。

View File

@@ -1,5 +1,5 @@
{ {
"version": "0.11.6", "version": "0.11.7",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "dist/index.js",
"module": "dist/dooringx-lib.esm.js", "module": "dist/dooringx-lib.esm.js",

View File

@@ -2,7 +2,7 @@
* @Author: yehuozhili * @Author: yehuozhili
* @Date: 2021-03-14 04:29:09 * @Date: 2021-03-14 04:29:09
* @LastEditors: yehuozhili * @LastEditors: yehuozhili
* @LastEditTime: 2021-12-31 00:25:43 * @LastEditTime: 2022-01-12 09:15:44
* @FilePath: \dooringx\packages\dooringx-lib\src\core\markline\calcRender.ts * @FilePath: \dooringx\packages\dooringx-lib\src\core\markline\calcRender.ts
*/ */
import { innerDragState } from '../innerDrag/state'; import { innerDragState } from '../innerDrag/state';
@@ -105,6 +105,9 @@ export function marklineCalRender(config: UserConfig, iframe: boolean): LinesTyp
// 只要cache里有东西说明有缓存 // 只要cache里有东西说明有缓存
if (marklineState.cache) { if (marklineState.cache) {
const focusItem = config.getFocusState();
const isMulti = focusItem.blocks.length > 1;
if (!isMulti) {
if (!marklineState.sortLeft) { if (!marklineState.sortLeft) {
marklineState.sortLeft = Object.values(marklineState.cache).sort((a, b) => { marklineState.sortLeft = Object.values(marklineState.cache).sort((a, b) => {
return a.left - b.left; return a.left - b.left;
@@ -141,7 +144,6 @@ export function marklineCalRender(config: UserConfig, iframe: boolean): LinesTyp
if (indexLeft) { if (indexLeft) {
marklineDisplay(realStyle, indexLeft[0], lines, focus, indexLeft[1], dirty, 'left'); marklineDisplay(realStyle, indexLeft[0], lines, focus, indexLeft[1], dirty, 'left');
} }
const indexLeftRight = binarySearchRemain<RealStyleType>( const indexLeftRight = binarySearchRemain<RealStyleType>(
realStyle.left, realStyle.left,
marklineState.sortRight, marklineState.sortRight,
@@ -237,6 +239,7 @@ export function marklineCalRender(config: UserConfig, iframe: boolean): LinesTyp
if (indexBottom) { if (indexBottom) {
marklineDisplay(realStyle, indexBottom[0], lines, focus, indexBottom[1], dirty, 'bottom'); marklineDisplay(realStyle, indexBottom[0], lines, focus, indexBottom[1], dirty, 'bottom');
} }
}
} else { } else {
for (let i = 0; i < len; i++) { for (let i = 0; i < len; i++) {
const v = unfocus[i]; const v = unfocus[i];

View File

@@ -1,6 +1,6 @@
{ {
"name": "dooringx-plugin-template", "name": "dooringx-plugin-template",
"version": "0.11.6", "version": "0.11.7",
"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",

View File

@@ -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.6", "dooringx-lib": "^0.11.7",
"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",