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{
22 "name" : " mind-elixir" ,
3- "version" : " 5.11.1-beta.4 " ,
3+ "version" : " 5.11.2 " ,
44 "type" : " module" ,
55 "description" : " Mind elixir is a free open source mind map core." ,
66 "keywords" : [
103103 "vite" : " ^7.1.7" ,
104104 "vite-plugin-istanbul" : " ^7.2.0"
105105 }
106- }
106+ }
Original file line number Diff line number Diff line change @@ -13,12 +13,13 @@ function collectData(instance: MindElixirInstance) {
1313 }
1414}
1515
16- export const scrollIntoView = function ( this : MindElixirInstance , el : HTMLElement ) {
16+ export const scrollIntoView = function ( this : MindElixirInstance , el : HTMLElement , forceCenter = false ) {
1717 // scrollIntoView needs to be implemented manually because native scrollIntoView behaves incorrectly after transform
1818 const container = this . container
1919 const rect = el . getBoundingClientRect ( )
2020 const containerRect = container . getBoundingClientRect ( )
2121 const isOutOfView =
22+ forceCenter ||
2223 rect . top > containerRect . bottom - 50 ||
2324 rect . bottom < containerRect . top + 50 ||
2425 rect . left > containerRect . right - 50 ||
You can’t perform that action at this time.
0 commit comments