Skip to content

Commit

Permalink
v1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
leaferjs committed Jan 21, 2025
1 parent c863a03 commit 6db1e6c
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/basic/app/grow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Leafer, Rect } from 'leafer-ui'

const leafer = new Leafer({
view: window,
grow: true, // 自动生长 [!code hl:3]
// growWidth: true, // 宽度是否生长, 默认同 grow
// growHeight: true // 高度是否生长, 默认同 grow
fill: 'black'
grow: true, // 自动生长 // [!code hl:3]
// growWidth: true, // 进一步细化宽度是否生长, 默认同 grow
// growHeight: true // 进一步细化高度是否生长, 默认同 grow
fill: 'gray'
})

const rect = Rect.one({ fill: '#32cd79', draggable: true }, 100, 100, 200, 200)
Expand Down
2 changes: 1 addition & 1 deletion src/performance/million.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Million Rects | Leafer UI</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<script src="https://unpkg.com/leafer-ui@1.3.2/dist/web.min.js"></script>
<script src="https://unpkg.com/leafer-ui@1.3.3/dist/web.min.js"></script>
</head>

<body></body>
Expand Down
22 changes: 22 additions & 0 deletions src/plugin/arrow/animate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Leafer } from 'leafer-ui'
import { Arrow } from '@leafer-in/arrow'
import '@leafer-in/animate'

const leafer = new Leafer({ view: window })

const rect = new Arrow({
x: 100,
y: 100,
stroke: '#32cd79',
strokeWidth: 5,
dashPattern: [10, 10], // 绘制虚线 // [!code hl:8]
dashOffset: 0,
animation: { // 虚线动画
style: { dashOffset: -20 },
easing: 'linear',
duration: 0.5,
loop: true,
}
})

leafer.add(rect)
8 changes: 4 additions & 4 deletions src/property/custom/addAttr-datatype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ import { Leafer, Text, dataType } from 'leafer-ui'

const leafer = new Leafer({ view: window })

Text.addAttr('version', '1.3.2', dataType) // [!code hl]
Text.addAttr('version', '1.3.3', dataType) // [!code hl]

// default version

const text = new Text({ text: 'Welcome to LeaferJS' })

leafer.add(text)

console.log((text as any).version) // 1.3.2
console.log((text as any).version) // 1.3.3

// set version

const text2 = new Text({ version: '1.3.2' } as any)
const text2 = new Text({ version: '1.3.3' } as any)

console.log((text2 as any).version) // 1.3.2
console.log((text2 as any).version) // 1.3.3
2 changes: 1 addition & 1 deletion src/start/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Demo | Leafer UI</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<script src="https://unpkg.com/leafer-ui@1.3.2/dist/web.min.js"></script>
<script src="https://unpkg.com/leafer-ui@1.3.3/dist/web.min.js"></script>
</head>
<body></body>
<script>
Expand Down
2 changes: 1 addition & 1 deletion src/worker/worker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// 你也可以使用npm包模式,编译成js文件供worker调用
importScripts(
'https://unpkg.com/@leafer-ui/worker@1.3.2/dist/worker.min.js'
'https://unpkg.com/@leafer-ui/worker@1.3.3/dist/worker.min.js'
)

const { Leafer, Rect } = LeaferUI
Expand Down

0 comments on commit 6db1e6c

Please sign in to comment.