@blocksuite/global
Advanced tools
Comparing version 0.0.0-canary-20241218024138 to 0.0.0-canary-20241219001505
# @blocksuite/global | ||
## 0.0.0-canary-20241218024138 | ||
## 0.0.0-canary-20241219001505 | ||
@@ -9,2 +9,25 @@ ### Patch Changes | ||
## 0.19.3 | ||
### Patch Changes | ||
- 59e0cd6: Release patch version. | ||
## Feat | ||
- feat(edgeless): mind map collapse (#8905) | ||
- feat(blocks): add plain text adapter for mind map element (#9006) | ||
- feat(edgeless): add views and event support for canvas elements (#8882) | ||
- feat(edgeless): improve local element support (#8869) | ||
## Fix | ||
- fix: drag doc from affine to edgeless (#9011) | ||
- fix: mind map opacity (#9010) | ||
- fix: should only generate new id when cross doc (#9009) | ||
## Perf | ||
- perf(std): add cache for gfx viewport (#9003) | ||
## 0.19.2 | ||
@@ -11,0 +34,0 @@ |
@@ -47,2 +47,3 @@ import type { SerializedXYWH, XYWH } from '../xywh.js'; | ||
containsPoint([x, y]: IVec): boolean; | ||
expand(margin: [number, number]): Bound; | ||
expand(left: number, top?: number, right?: number, bottom?: number): Bound; | ||
@@ -49,0 +50,0 @@ getRelativePoint([x, y]: IVec): IVec; |
@@ -131,3 +131,10 @@ import { getIBoundFromPoints } from '../bound.js'; | ||
} | ||
expand(left, top = left, right = left, bottom = top) { | ||
expand(left, top, right, bottom) { | ||
if (Array.isArray(left)) { | ||
const [x, y] = left; | ||
return new Bound(this.x - x, this.y - y, this.w + x * 2, this.h + y * 2); | ||
} | ||
top ??= left; | ||
right ??= left; | ||
bottom ??= top; | ||
return new Bound(this.x - left, this.y - top, this.w + left + right, this.h + top + bottom); | ||
@@ -134,0 +141,0 @@ } |
{ | ||
"name": "@blocksuite/global", | ||
"version": "0.0.0-canary-20241218024138", | ||
"version": "0.0.0-canary-20241219001505", | ||
"types": "./index.d.ts", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -185,8 +185,19 @@ import type { SerializedXYWH, XYWH } from '../xywh.js'; | ||
expand(margin: [number, number]): Bound; | ||
expand(left: number, top?: number, right?: number, bottom?: number): Bound; | ||
expand( | ||
left: number, | ||
top: number = left, | ||
right: number = left, | ||
bottom: number = top | ||
left: number | [number, number], | ||
top?: number, | ||
right?: number, | ||
bottom?: number | ||
) { | ||
if (Array.isArray(left)) { | ||
const [x, y] = left; | ||
return new Bound(this.x - x, this.y - y, this.w + x * 2, this.h + y * 2); | ||
} | ||
top ??= left; | ||
right ??= left; | ||
bottom ??= top; | ||
return new Bound( | ||
@@ -193,0 +204,0 @@ this.x - left, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
736616
11082