File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,20 @@ class CodePreview extends Component {
7
7
render ( ) : JSX . Element {
8
8
const { focusComponent, components } = this . props ;
9
9
return (
10
- < div >
11
- { /* <p> */ }
12
- < pre > { format ( componentRender ( focusComponent , components ) ) } </ pre >
13
- { /* </p> */ }
10
+ < div
11
+ style = { {
12
+ width : '500px' ,
13
+ height : '290px' ,
14
+ direction : 'rtl' ,
15
+ paddingLeft : '20px' ,
16
+ color : '#D3D3D3' ,
17
+ fontSize : 16 ,
18
+ overflow : 'auto' ,
19
+ } }
20
+ >
21
+ < pre style = { { direction : 'ltr' } } >
22
+ { format ( componentRender ( focusComponent , components ) ) }
23
+ </ pre >
14
24
</ div >
15
25
) ;
16
26
}
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 ) => rectB . props . width * rectB . props . height - rectA . props . width * rectA . 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 )
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
You can’t perform that action at this time.
0 commit comments