File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change
1
+ import React , { Component , Fragment } from 'react' ;
2
+ import { withStyles } from '@material-ui/core/styles' ;
3
+ import { format } from 'prettier' ;
4
+ import componentRender from '../utils/componentRender.util' ;
5
+
6
+ class CodePreview extends Component {
7
+ render ( ) : JSX . Element {
8
+ const { focusComponent, components } = this . props ;
9
+ return (
10
+ < div >
11
+ { /* <p> */ }
12
+ < pre > { format ( componentRender ( focusComponent , components ) ) } </ pre >
13
+ { /* </p> */ }
14
+ </ div >
15
+ ) ;
16
+ }
17
+ }
18
+
19
+ export default CodePreview ;
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ class KonvaStage extends Component {
196
196
imageSource = { child . htmlElement == 'Image' && child . HTMLInfo . Src ? child . HTMLInfo . Src : null }
197
197
/>
198
198
) )
199
- . sort ( ( rectA , rectB ) => rectA . props . width * rectA . props . height < rectB . props . width * rectB . props . height ) // shouldnt this be subtraction instead of < ? see MDN
199
+ . sort ( ( rectA , rectB ) => rectB . props . width * rectB . props . height - rectA . props . width * rectA . props . height ) // shouldnt this be subtraction instead of < ? see MDN
200
200
// reasoning for the sort:
201
201
// Konva determines zIndex (which rect is clicked on if rects overlap) based on rendering order
202
202
// as long as the smallest components are rendered last they will always be accessible over the big boys
Original file line number Diff line number Diff line change 4
4
box-sizing : inherit;
5
5
}
6
6
7
+ * {
8
+ overflow : hidden;
9
+ overflow-y : hidden;
10
+ -ms-overflow-style : none;
11
+ scrollbar-width : none;
12
+ }
13
+
7
14
html {
8
15
box-sizing : border-box;
9
16
overflow : hidden;
14
21
padding : 0 ;
15
22
font-family : 'Open sans' , sans-serif;
16
23
font-weight : 400 ;
24
+ overflow : hidden;
17
25
}
18
26
19
27
/*
You can’t perform that action at this time.
0 commit comments