File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 5.9.1 - 2026-02-24
4+
5+ ### Features
6+
7+ - Improve pinch gesture ux
8+
9+ ### Refactors
10+
11+ - Remove top-level scope document to avoid immediate errors in SSR applications
12+
313## 5.9.0 - 2026-02-21
414
515### Features
Original file line number Diff line number Diff line change 11{
22 "name" : " mind-elixir" ,
3- "version" : " 5.9.0 " ,
3+ "version" : " 5.9.1 " ,
44 "type" : " module" ,
55 "description" : " Mind elixir is a free open source mind map core." ,
66 "keywords" : [
Original file line number Diff line number Diff line change @@ -267,24 +267,14 @@ export default function (mind: MindElixirInstance) {
267267 if ( lastDistance == null ) {
268268 lastDistance = newDistance
269269 } else {
270- const delta = newDistance - lastDistance
271- const THRESHOLD = 8
272-
273- if ( Math . abs ( delta ) > THRESHOLD ) {
274- if ( delta > 0 ) {
275- handleZoom ( mind , 'in' , {
276- x : ( p1 . x + p2 . x ) / 2 ,
277- y : ( p1 . y + p2 . y ) / 2 ,
278- } )
279- } else {
280- handleZoom ( mind , 'out' , {
281- x : ( p1 . x + p2 . x ) / 2 ,
282- y : ( p1 . y + p2 . y ) / 2 ,
283- } )
284- }
285-
286- lastDistance = newDistance
270+ if ( lastDistance > 0 ) {
271+ const scaleRatio = newDistance / lastDistance
272+ mind . scale ( mind . scaleVal * scaleRatio , {
273+ x : ( p1 . x + p2 . x ) / 2 ,
274+ y : ( p1 . y + p2 . y ) / 2 ,
275+ } )
287276 }
277+ lastDistance = newDistance
288278 }
289279 return
290280 }
You can’t perform that action at this time.
0 commit comments