@pie-element/hotspot 7.9.10-next.12 → 7.9.10-next.2
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.10-next.
|
|
3
|
+
"version": "7.9.10-next.2+036cb25b0",
|
|
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": "036cb25b08006ce6cbb09b50102d0c807996c6fc",
|
|
22
22
|
"scripts": {
|
|
23
23
|
"postpublish": "../../scripts/postpublish"
|
|
24
24
|
},
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import _ from 'lodash';
|
|
2
3
|
import { shallow } from 'enzyme';
|
|
3
4
|
import toJson from 'enzyme-to-json';
|
|
4
5
|
import Konva from 'konva';
|
|
5
6
|
|
|
6
7
|
import { shallowChild } from '@pie-lib/pie-toolbox/test-utils';
|
|
7
|
-
import {
|
|
8
|
+
import {CorrectAnswerToggle} from '@pie-lib/pie-toolbox/correct-answer-toggle';
|
|
8
9
|
|
|
9
10
|
import Container, { Container as ContainerComp } from '../hotspot/container';
|
|
10
11
|
import HotspotComponent from '../hotspot/index';
|
|
@@ -128,22 +129,28 @@ describe('Container', () => {
|
|
|
128
129
|
let onSelectChoice, wrapper;
|
|
129
130
|
|
|
130
131
|
const mkWrapper = (opts = {}) => {
|
|
131
|
-
opts =
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
132
|
+
opts = _.extend(
|
|
133
|
+
{
|
|
134
|
+
classes: {
|
|
135
|
+
base: 'base',
|
|
136
|
+
},
|
|
137
|
+
dimensions: {
|
|
138
|
+
height: 0,
|
|
139
|
+
width: 0,
|
|
140
|
+
},
|
|
141
|
+
disabled: false,
|
|
142
|
+
hotspotColor: 'rgba(137, 183, 244, 0.65)',
|
|
143
|
+
imageUrl: '',
|
|
144
|
+
isEvaluateMode: false,
|
|
145
|
+
outlineColor: 'blue',
|
|
146
|
+
session: { answers: [] },
|
|
147
|
+
shapes: {
|
|
148
|
+
rectangles: [],
|
|
149
|
+
polygons: [],
|
|
150
|
+
},
|
|
144
151
|
},
|
|
145
|
-
|
|
146
|
-
|
|
152
|
+
opts,
|
|
153
|
+
);
|
|
147
154
|
|
|
148
155
|
return shallow(<Container {...opts} onSelectChoice={onSelectChoice} />);
|
|
149
156
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import _ from 'lodash';
|
|
2
3
|
import { shallow } from 'enzyme';
|
|
3
4
|
import toJson from 'enzyme-to-json';
|
|
4
5
|
import Konva from 'konva';
|
|
@@ -16,24 +17,28 @@ describe('Polygon', () => {
|
|
|
16
17
|
let onClick, wrapper;
|
|
17
18
|
|
|
18
19
|
const mkWrapper = (opts = {}) => {
|
|
19
|
-
opts =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
opts = _.extend(
|
|
21
|
+
{
|
|
22
|
+
classes: {
|
|
23
|
+
base: 'base',
|
|
24
|
+
},
|
|
25
|
+
height: 200,
|
|
26
|
+
hotspotColor: 'rgba(137, 183, 244, 0.65)',
|
|
27
|
+
id: '1',
|
|
28
|
+
isCorrect: false,
|
|
29
|
+
isEvaluateMode: false,
|
|
30
|
+
evaluateText: null,
|
|
31
|
+
disabled: false,
|
|
32
|
+
outlineColor: 'blue',
|
|
33
|
+
selected: false,
|
|
34
|
+
points: [
|
|
35
|
+
{ x: 94, y: 4 },
|
|
36
|
+
{ x: 89, y: 4 },
|
|
37
|
+
{ x: 36, y: 40 },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
opts,
|
|
41
|
+
);
|
|
37
42
|
|
|
38
43
|
return shallow(<Polygon {...opts} onClick={onClick} />);
|
|
39
44
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import _ from 'lodash';
|
|
2
3
|
import { shallow } from 'enzyme';
|
|
3
4
|
import toJson from 'enzyme-to-json';
|
|
4
5
|
import Konva from 'konva';
|
|
@@ -22,22 +23,26 @@ describe('Rectangle', () => {
|
|
|
22
23
|
let onClick, wrapper;
|
|
23
24
|
|
|
24
25
|
const mkWrapper = (opts = {}) => {
|
|
25
|
-
opts =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
opts = _.extend(
|
|
27
|
+
{
|
|
28
|
+
classes: {
|
|
29
|
+
base: 'base',
|
|
30
|
+
},
|
|
31
|
+
height: 200,
|
|
32
|
+
hotspotColor: 'rgba(137, 183, 244, 0.65)',
|
|
33
|
+
id: '1',
|
|
34
|
+
isCorrect: false,
|
|
35
|
+
isEvaluateMode: false,
|
|
36
|
+
evaluateText: null,
|
|
37
|
+
disabled: false,
|
|
38
|
+
outlineColor: 'blue',
|
|
39
|
+
selected: false,
|
|
40
|
+
width: 300,
|
|
41
|
+
x: 5,
|
|
42
|
+
y: 5,
|
|
43
|
+
},
|
|
44
|
+
opts,
|
|
45
|
+
);
|
|
41
46
|
|
|
42
47
|
return shallow(<Rectangle {...opts} onClick={onClick} />);
|
|
43
48
|
};
|