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:
@@ -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
|
||||
};
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user