@pie-element/hotspot 7.9.9 → 7.9.10-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/hotspot",
|
|
3
|
-
"version": "7.9.
|
|
3
|
+
"version": "7.9.10-next.10+7ab24ec5b",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "pie-framework/pie-elements",
|
|
6
6
|
"publishConfig": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"author": "pie framework developers",
|
|
20
20
|
"license": "ISC",
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "7ab24ec5bc047e9ebea8c34854247fdd006e807e",
|
|
22
22
|
"scripts": {
|
|
23
23
|
"postpublish": "../../scripts/postpublish"
|
|
24
24
|
},
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import _ from 'lodash';
|
|
3
2
|
import { shallow } from 'enzyme';
|
|
4
3
|
import toJson from 'enzyme-to-json';
|
|
5
4
|
import Konva from 'konva';
|
|
6
5
|
|
|
7
6
|
import { shallowChild } from '@pie-lib/pie-toolbox/test-utils';
|
|
8
|
-
import {CorrectAnswerToggle} from '@pie-lib/pie-toolbox/correct-answer-toggle';
|
|
7
|
+
import { CorrectAnswerToggle } from '@pie-lib/pie-toolbox/correct-answer-toggle';
|
|
9
8
|
|
|
10
9
|
import Container, { Container as ContainerComp } from '../hotspot/container';
|
|
11
10
|
import HotspotComponent from '../hotspot/index';
|
|
@@ -129,28 +128,22 @@ describe('Container', () => {
|
|
|
129
128
|
let onSelectChoice, wrapper;
|
|
130
129
|
|
|
131
130
|
const mkWrapper = (opts = {}) => {
|
|
132
|
-
opts =
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
outlineColor: 'blue',
|
|
146
|
-
session: { answers: [] },
|
|
147
|
-
shapes: {
|
|
148
|
-
rectangles: [],
|
|
149
|
-
polygons: [],
|
|
150
|
-
},
|
|
131
|
+
opts =
|
|
132
|
+
{
|
|
133
|
+
classes: { base: 'base' },
|
|
134
|
+
dimensions: { height: 0, width: 0, },
|
|
135
|
+
disabled: false,
|
|
136
|
+
hotspotColor: 'rgba(137, 183, 244, 0.65)',
|
|
137
|
+
imageUrl: '',
|
|
138
|
+
isEvaluateMode: false,
|
|
139
|
+
outlineColor: 'blue',
|
|
140
|
+
session: { answers: [] },
|
|
141
|
+
shapes: {
|
|
142
|
+
rectangles: [],
|
|
143
|
+
polygons: [],
|
|
151
144
|
},
|
|
152
|
-
opts,
|
|
153
|
-
|
|
145
|
+
...opts,
|
|
146
|
+
}
|
|
154
147
|
|
|
155
148
|
return shallow(<Container {...opts} onSelectChoice={onSelectChoice} />);
|
|
156
149
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import _ from 'lodash';
|
|
3
2
|
import { shallow } from 'enzyme';
|
|
4
3
|
import toJson from 'enzyme-to-json';
|
|
5
4
|
import Konva from 'konva';
|
|
@@ -17,28 +16,24 @@ describe('Polygon', () => {
|
|
|
17
16
|
let onClick, wrapper;
|
|
18
17
|
|
|
19
18
|
const mkWrapper = (opts = {}) => {
|
|
20
|
-
opts =
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
opts,
|
|
41
|
-
);
|
|
19
|
+
opts = {
|
|
20
|
+
classes: { base: 'base' },
|
|
21
|
+
height: 200,
|
|
22
|
+
hotspotColor: 'rgba(137, 183, 244, 0.65)',
|
|
23
|
+
id: '1',
|
|
24
|
+
isCorrect: false,
|
|
25
|
+
isEvaluateMode: false,
|
|
26
|
+
evaluateText: null,
|
|
27
|
+
disabled: false,
|
|
28
|
+
outlineColor: 'blue',
|
|
29
|
+
selected: false,
|
|
30
|
+
points: [
|
|
31
|
+
{ x: 94, y: 4 },
|
|
32
|
+
{ x: 89, y: 4 },
|
|
33
|
+
{ x: 36, y: 40 },
|
|
34
|
+
],
|
|
35
|
+
...opts,
|
|
36
|
+
};
|
|
42
37
|
|
|
43
38
|
return shallow(<Polygon {...opts} onClick={onClick} />);
|
|
44
39
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import _ from 'lodash';
|
|
3
2
|
import { shallow } from 'enzyme';
|
|
4
3
|
import toJson from 'enzyme-to-json';
|
|
5
4
|
import Konva from 'konva';
|
|
@@ -23,26 +22,22 @@ describe('Rectangle', () => {
|
|
|
23
22
|
let onClick, wrapper;
|
|
24
23
|
|
|
25
24
|
const mkWrapper = (opts = {}) => {
|
|
26
|
-
opts =
|
|
27
|
-
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
y: 5,
|
|
43
|
-
},
|
|
44
|
-
opts,
|
|
45
|
-
);
|
|
25
|
+
opts = {
|
|
26
|
+
classes: { base: 'base' },
|
|
27
|
+
height: 200,
|
|
28
|
+
hotspotColor: 'rgba(137, 183, 244, 0.65)',
|
|
29
|
+
id: '1',
|
|
30
|
+
isCorrect: false,
|
|
31
|
+
isEvaluateMode: false,
|
|
32
|
+
evaluateText: null,
|
|
33
|
+
disabled: false,
|
|
34
|
+
outlineColor: 'blue',
|
|
35
|
+
selected: false,
|
|
36
|
+
width: 300,
|
|
37
|
+
x: 5,
|
|
38
|
+
y: 5,
|
|
39
|
+
...opts,
|
|
40
|
+
};
|
|
46
41
|
|
|
47
42
|
return shallow(<Rectangle {...opts} onClick={onClick} />);
|
|
48
43
|
};
|