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 parent
21c392752e
commit
b299d32fc3
11 files changed
+97
-55
No files matched your search
@@ -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