Skip to content

Commit

Permalink
fix app config.zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
leaferjs committed Nov 29, 2023
1 parent eaf2317 commit 53b494e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/display/src/UI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class UI extends Leaf implements IUI {

// corner

@pathType()
@pathType(0)
public cornerRadius: number | number[] | ICornerRadiusString

@pathType()
Expand Down
2 changes: 1 addition & 1 deletion packages/type/src/design.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function design(leafer: ILeaferBase): void {
leafer.__eventIds.push(
leafer.on_(MoveEvent.BEFORE_MOVE, (e: MoveEvent) => { LeafHelper.moveWorld(leafer.zoomLayer, e.moveX, e.moveY) }),
leafer.on_(ZoomEvent.BEFORE_ZOOM, (e: ZoomEvent) => {
const { scaleX } = leafer.zoomLayer.__, { min, max } = leafer.config.zoom
const { scaleX } = leafer.zoomLayer.__, { min, max } = leafer.app.config.zoom
let { scale } = e
if (scale * Math.abs(scaleX) < min) scale = min / scaleX
else if (scale * Math.abs(scaleX) > max) scale = max / scaleX
Expand Down

0 comments on commit 53b494e

Please sign in to comment.