Skip to content

Commit e3294a0

Browse files
committed
feat(Reset): Ability to reset transforms
1 parent cbc86f2 commit e3294a0

File tree

7 files changed

+448
-14
lines changed

7 files changed

+448
-14
lines changed

__tests__/__snapshots__/ViewEditor.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ exports[`ViewEditor Component should render tree 1`] = `
2828
"scale": 1,
2929
},
3030
Object {
31-
"rotate": "0deg0",
31+
"rotate": "0deg",
3232
},
3333
],
3434
}
Lines changed: 366 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,366 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Common utils should generate array for given range 1`] = `
4+
Array [
5+
0,
6+
1,
7+
2,
8+
3,
9+
4,
10+
5,
11+
6,
12+
7,
13+
8,
14+
9,
15+
10,
16+
11,
17+
12,
18+
13,
19+
14,
20+
15,
21+
16,
22+
17,
23+
18,
24+
19,
25+
20,
26+
21,
27+
22,
28+
23,
29+
24,
30+
25,
31+
26,
32+
27,
33+
28,
34+
29,
35+
30,
36+
31,
37+
32,
38+
33,
39+
34,
40+
35,
41+
36,
42+
37,
43+
38,
44+
39,
45+
40,
46+
41,
47+
42,
48+
43,
49+
44,
50+
45,
51+
46,
52+
47,
53+
48,
54+
49,
55+
50,
56+
51,
57+
52,
58+
53,
59+
54,
60+
55,
61+
56,
62+
57,
63+
58,
64+
59,
65+
60,
66+
61,
67+
62,
68+
63,
69+
64,
70+
65,
71+
66,
72+
67,
73+
68,
74+
69,
75+
70,
76+
71,
77+
72,
78+
73,
79+
74,
80+
75,
81+
76,
82+
77,
83+
78,
84+
79,
85+
80,
86+
81,
87+
82,
88+
83,
89+
84,
90+
85,
91+
86,
92+
87,
93+
88,
94+
89,
95+
90,
96+
91,
97+
92,
98+
93,
99+
94,
100+
95,
101+
96,
102+
97,
103+
98,
104+
99,
105+
100,
106+
101,
107+
102,
108+
103,
109+
104,
110+
105,
111+
106,
112+
107,
113+
108,
114+
109,
115+
110,
116+
111,
117+
112,
118+
113,
119+
114,
120+
115,
121+
116,
122+
117,
123+
118,
124+
119,
125+
120,
126+
121,
127+
122,
128+
123,
129+
124,
130+
125,
131+
126,
132+
127,
133+
128,
134+
129,
135+
130,
136+
131,
137+
132,
138+
133,
139+
134,
140+
135,
141+
136,
142+
137,
143+
138,
144+
139,
145+
140,
146+
141,
147+
142,
148+
143,
149+
144,
150+
145,
151+
146,
152+
147,
153+
148,
154+
149,
155+
150,
156+
151,
157+
152,
158+
153,
159+
154,
160+
155,
161+
156,
162+
157,
163+
158,
164+
159,
165+
160,
166+
161,
167+
162,
168+
163,
169+
164,
170+
165,
171+
166,
172+
167,
173+
168,
174+
169,
175+
170,
176+
171,
177+
172,
178+
173,
179+
174,
180+
175,
181+
176,
182+
177,
183+
178,
184+
179,
185+
180,
186+
181,
187+
182,
188+
183,
189+
184,
190+
185,
191+
186,
192+
187,
193+
188,
194+
189,
195+
190,
196+
191,
197+
192,
198+
193,
199+
194,
200+
195,
201+
196,
202+
197,
203+
198,
204+
199,
205+
200,
206+
201,
207+
202,
208+
203,
209+
204,
210+
205,
211+
206,
212+
207,
213+
208,
214+
209,
215+
210,
216+
211,
217+
212,
218+
213,
219+
214,
220+
215,
221+
216,
222+
217,
223+
218,
224+
219,
225+
220,
226+
221,
227+
222,
228+
223,
229+
224,
230+
225,
231+
226,
232+
227,
233+
228,
234+
229,
235+
230,
236+
231,
237+
232,
238+
233,
239+
234,
240+
235,
241+
236,
242+
237,
243+
238,
244+
239,
245+
240,
246+
241,
247+
242,
248+
243,
249+
244,
250+
245,
251+
246,
252+
247,
253+
248,
254+
249,
255+
250,
256+
251,
257+
252,
258+
253,
259+
254,
260+
255,
261+
256,
262+
257,
263+
258,
264+
259,
265+
260,
266+
261,
267+
262,
268+
263,
269+
264,
270+
265,
271+
266,
272+
267,
273+
268,
274+
269,
275+
270,
276+
271,
277+
272,
278+
273,
279+
274,
280+
275,
281+
276,
282+
277,
283+
278,
284+
279,
285+
280,
286+
281,
287+
282,
288+
283,
289+
284,
290+
285,
291+
286,
292+
287,
293+
288,
294+
289,
295+
290,
296+
291,
297+
292,
298+
293,
299+
294,
300+
295,
301+
296,
302+
297,
303+
298,
304+
299,
305+
300,
306+
301,
307+
302,
308+
303,
309+
304,
310+
305,
311+
306,
312+
307,
313+
308,
314+
309,
315+
310,
316+
311,
317+
312,
318+
313,
319+
314,
320+
315,
321+
316,
322+
317,
323+
318,
324+
319,
325+
320,
326+
321,
327+
322,
328+
323,
329+
324,
330+
325,
331+
326,
332+
327,
333+
328,
334+
329,
335+
330,
336+
331,
337+
332,
338+
333,
339+
334,
340+
335,
341+
336,
342+
337,
343+
338,
344+
339,
345+
340,
346+
341,
347+
342,
348+
343,
349+
344,
350+
345,
351+
346,
352+
347,
353+
348,
354+
349,
355+
350,
356+
351,
357+
352,
358+
353,
359+
354,
360+
355,
361+
356,
362+
357,
363+
358,
364+
359,
365+
]
366+
`;

__tests__/common.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react';
2+
import { generateArray } from '../lib/utils';
3+
4+
describe('Common utils', () => {
5+
it('should generate array for given range', () => {
6+
const arr = generateArray(360);
7+
expect(arr.length).toBe(360);
8+
expect(arr).toMatchSnapshot();
9+
});
10+
});

0 commit comments

Comments
 (0)