This repository was archived by the owner on Aug 1, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-26
lines changed Expand file tree Collapse file tree 2 files changed +3
-26
lines changed Original file line number Diff line number Diff line change @@ -19,24 +19,7 @@ const canvasStyle = {
19
19
position : "absolute"
20
20
} ;
21
21
22
- const canvasTypes = [
23
- {
24
- name : "interface" ,
25
- zIndex : 15
26
- } ,
27
- {
28
- name : "drawing" ,
29
- zIndex : 11
30
- } ,
31
- {
32
- name : "temp" ,
33
- zIndex : 12
34
- } ,
35
- {
36
- name : "grid" ,
37
- zIndex : 10
38
- }
39
- ] ;
22
+ const canvasTypes = [ "grid" , "drawing" , "temp" , "interface" ] ;
40
23
41
24
const dimensionsPropTypes = PropTypes . oneOfType ( [
42
25
PropTypes . number ,
@@ -572,7 +555,7 @@ export default class extends PureComponent {
572
555
}
573
556
} }
574
557
>
575
- { canvasTypes . map ( ( { name, zIndex } ) => {
558
+ { canvasTypes . map ( ( name ) => {
576
559
const isInterface = name === "interface" ;
577
560
return (
578
561
< canvas
@@ -583,7 +566,7 @@ export default class extends PureComponent {
583
566
this . ctx [ name ] = canvas . getContext ( "2d" ) ;
584
567
}
585
568
} }
586
- style = { { ... canvasStyle , zIndex } }
569
+ style = { canvasStyle }
587
570
onMouseDown = { isInterface ? this . handleDrawStart : undefined }
588
571
onMouseMove = { isInterface ? this . handleDrawMove : undefined }
589
572
onMouseUp = { isInterface ? this . handleDrawEnd : undefined }
Original file line number Diff line number Diff line change 1
1
import expect from "expect" ;
2
- import Enzyme , { shallow } from "enzyme" ;
3
- import Adapter from "enzyme-adapter-react-16" ;
4
2
import React from "react" ;
5
3
import { render , unmountComponentAtNode } from "react-dom" ;
6
4
7
5
import DrawCanvas from "src/" ;
8
6
9
7
describe ( "DrawCanvas" , ( ) => {
10
- before ( ( ) => {
11
- Enzyme . configure ( { adapter : new Adapter ( ) } ) ;
12
- } ) ;
13
-
14
8
let node ;
15
9
16
10
beforeEach ( ( ) => {
You can’t perform that action at this time.
0 commit comments