Adding a layout pass to SVG image components

text nodes are the only elements that need to be "measured". The
dimensions of all other image components can be determined based on the
dimensions of their children. This adds a pre-rendering pass to work out
dimensions so multiple renders don't need to happen
This commit is contained in:
Jeff Avallone
2019-01-26 17:25:38 -05:00
parent 21c392752e
commit b299d32fc3
11 changed files with 97 additions and 55 deletions
+2
View File
@@ -1,4 +1,5 @@
import Render from 'components/Render';
import layout from 'layout';
const parse = expr => {
return {
@@ -19,5 +20,6 @@ const parse = expr => {
export {
parse,
layout,
Render
};
+2
View File
@@ -1,4 +1,5 @@
import Render from 'components/Render';
import layout from 'layout';
const parse = expr => {
return {
@@ -19,5 +20,6 @@ const parse = expr => {
export {
parse,
layout,
Render
};