♻️ Initial refactor of page data structure (wip).

Still work in progress but is a necessary step for a future
(re)introduction of groups.
This commit is contained in:
Andrey Antukh 2020-03-08 12:46:09 +01:00
parent cbad98b783
commit ba373573e0
29 changed files with 1116 additions and 787 deletions

View file

@ -86,3 +86,80 @@
'(promesa.core/let)]}}}})
(kondo/print!))))
(comment
{:version 1
:options {}
:shapes [:id1 :id2]
:canvas [:id3]
:shapes-by-id {:id1 {:canvas :id3} :id2 {} :id3 {}}})
(comment
{:version 2
:options {}
:objects
{:root
{:type :frame
:shapes [:sid0 :frame-0]}
:frame0
{:type :frame
:parent :root
:shapes [:sid1 :sid2]}
:sid0
{:type :rect
:parent :root}
:sid1
{:type :rect
:parent :frame0}
:sid2
{:type :group
:shapes [:sid3 :sid4]
:parent :frame0}
:sid3
{:type :elipse
:parent :sid2}
:sid4
{:type :elipse
:parent :sid2}}})
(comment
{:version 3
:options {}
:rmap
{:id1 :root-frame
:id2 :root-frame
:id3 :frame-id-1
:id4 :frame-id-2
:id5 :frame-id-2
:id6 :frame-id-2}
:frames
{:root-frame
{:type :frame
:shapes [:id1 :id2]
:objects
{:id1 {:type :rect}
:id2 {:type :elipse}}}
:frame-id-1
{:type :frame
:shapes [:id3]
:objects
{:id3 {:type :path}}}
:frame-id-2
{:type :frame
:shapes [:id4]
:objects
{:id4 {:type :group
:shapes [:id5 :id6]}
:id5 {:type :path :parent :id4}
:id6 {:type :elipse :parent :id4}}}}})