@pie-element/hotspot 10.0.0-next.43 → 10.1.2-next.1
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/CHANGELOG.md +1032 -2486
- package/configure/CHANGELOG.md +881 -2216
- package/configure/lib/defaults.js +3 -0
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/hotspot-circle.js +6 -4
- package/configure/lib/hotspot-circle.js.map +1 -1
- package/configure/lib/hotspot-drawable.js +5 -5
- package/configure/lib/hotspot-drawable.js.map +1 -1
- package/configure/lib/hotspot-polygon.js +1 -2
- package/configure/lib/hotspot-polygon.js.map +1 -1
- package/configure/lib/hotspot-rectangle.js +6 -5
- package/configure/lib/hotspot-rectangle.js.map +1 -1
- package/configure/lib/utils.js +2 -3
- package/configure/lib/utils.js.map +1 -1
- package/configure/package.json +6 -6
- package/configure/src/__tests__/DeleteWidget.test.jsx +366 -0
- package/configure/src/__tests__/button.test.jsx +198 -0
- package/configure/src/__tests__/hotspot-circle.test.jsx +259 -0
- package/configure/src/__tests__/hotspot-palette.test.jsx +71 -0
- package/configure/src/__tests__/image-konva.test.jsx +226 -0
- package/configure/src/defaults.js +1 -0
- package/configure/src/hotspot-circle.jsx +4 -2
- package/configure/src/hotspot-drawable.jsx +1 -1
- package/configure/src/hotspot-polygon.jsx +0 -1
- package/configure/src/hotspot-rectangle.jsx +4 -3
- package/configure/src/utils.js +1 -1
- package/controller/CHANGELOG.md +600 -1532
- package/controller/lib/index.js +2 -2
- package/controller/lib/index.js.map +1 -1
- package/controller/lib/utils.js +3 -5
- package/controller/lib/utils.js.map +1 -1
- package/controller/package.json +3 -3
- package/controller/src/index.js +1 -1
- package/controller/src/utils.js +1 -2
- package/lib/hotspot/circle.js +1 -2
- package/lib/hotspot/circle.js.map +1 -1
- package/lib/hotspot/polygon.js +0 -1
- package/lib/hotspot/polygon.js.map +1 -1
- package/lib/hotspot/rectangle.js +0 -1
- package/lib/hotspot/rectangle.js.map +1 -1
- package/package.json +7 -7
- package/src/hotspot/__tests__/circle.test.jsx +464 -0
- package/src/hotspot/__tests__/container.test.jsx +546 -0
- package/src/hotspot/__tests__/image-konva-tooltip.test.jsx +510 -0
- package/src/hotspot/__tests__/polygon.test.jsx +502 -0
- package/src/hotspot/__tests__/rectangle.test.jsx +418 -0
- package/src/hotspot/circle.jsx +0 -1
- package/src/hotspot/polygon.jsx +0 -1
- package/src/hotspot/rectangle.jsx +0 -1
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, fireEvent } from '@testing-library/react';
|
|
3
|
+
import Konva from 'konva';
|
|
4
|
+
import RectComponent from '../rectangle';
|
|
5
|
+
|
|
6
|
+
Konva.isBrowser = false;
|
|
7
|
+
|
|
8
|
+
jest.mock('react-konva', () => {
|
|
9
|
+
const React = require('react');
|
|
10
|
+
return {
|
|
11
|
+
Rect: ({ onClick, onTap, onMouseEnter, onMouseLeave, ...props }) => {
|
|
12
|
+
const handleClick = (e) => {
|
|
13
|
+
if (onClick) onClick(e);
|
|
14
|
+
if (onTap) onTap(e);
|
|
15
|
+
};
|
|
16
|
+
return React.createElement('div', {
|
|
17
|
+
'data-testid': 'rect',
|
|
18
|
+
onClick: handleClick,
|
|
19
|
+
onMouseEnter,
|
|
20
|
+
onMouseLeave,
|
|
21
|
+
...props,
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
Group: ({ children, ...props }) => React.createElement('div', { 'data-testid': 'group', ...props }, children),
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
jest.mock('../image-konva-tooltip', () => {
|
|
29
|
+
return function ImageComponent({ src, x, y, tooltip }) {
|
|
30
|
+
return <div data-testid="icon-image" data-src={src} data-x={x} data-y={y} data-tooltip={tooltip} />;
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
describe('RectComponent', () => {
|
|
35
|
+
let defaultProps;
|
|
36
|
+
|
|
37
|
+
beforeEach(() => {
|
|
38
|
+
defaultProps = {
|
|
39
|
+
id: 'rect1',
|
|
40
|
+
x: 10,
|
|
41
|
+
y: 20,
|
|
42
|
+
width: 100,
|
|
43
|
+
height: 80,
|
|
44
|
+
hotspotColor: '#FF0000',
|
|
45
|
+
selectedHotspotColor: '#00FF00',
|
|
46
|
+
outlineColor: '#0000FF',
|
|
47
|
+
hoverOutlineColor: '#FFFF00',
|
|
48
|
+
selected: false,
|
|
49
|
+
isCorrect: false,
|
|
50
|
+
isEvaluateMode: false,
|
|
51
|
+
disabled: false,
|
|
52
|
+
onClick: jest.fn(),
|
|
53
|
+
strokeWidth: 5,
|
|
54
|
+
scale: 1,
|
|
55
|
+
markAsCorrect: false,
|
|
56
|
+
showCorrectEnabled: false,
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
afterEach(() => {
|
|
61
|
+
document.body.style.cursor = 'default';
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
describe('rendering', () => {
|
|
65
|
+
it('should render without crashing', () => {
|
|
66
|
+
const { container } = render(<RectComponent {...defaultProps} />);
|
|
67
|
+
expect(container).toBeTruthy();
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('should render with correct dimensions', () => {
|
|
71
|
+
const { container } = render(<RectComponent {...defaultProps} />);
|
|
72
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
73
|
+
const mainRect = rects[rects.length - 1];
|
|
74
|
+
|
|
75
|
+
expect(mainRect).toHaveAttribute('x', '10');
|
|
76
|
+
expect(mainRect).toHaveAttribute('y', '20');
|
|
77
|
+
expect(mainRect).toHaveAttribute('width', '100');
|
|
78
|
+
expect(mainRect).toHaveAttribute('height', '80');
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it('should render with hotspot color when not selected', () => {
|
|
82
|
+
const { container } = render(<RectComponent {...defaultProps} />);
|
|
83
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
84
|
+
const mainRect = rects[rects.length - 1];
|
|
85
|
+
|
|
86
|
+
expect(mainRect).toHaveAttribute('fill', '#FF0000');
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it('should render with selected color when selected', () => {
|
|
90
|
+
const { container } = render(<RectComponent {...defaultProps} selected={true} />);
|
|
91
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
92
|
+
const mainRect = rects[rects.length - 1];
|
|
93
|
+
|
|
94
|
+
expect(mainRect).toHaveAttribute('fill', '#00FF00');
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('should apply scale transform', () => {
|
|
98
|
+
const { getByTestId } = render(<RectComponent {...defaultProps} scale={1.5} />);
|
|
99
|
+
const group = getByTestId('group');
|
|
100
|
+
|
|
101
|
+
expect(group).toHaveAttribute('scaleX', '1.5');
|
|
102
|
+
expect(group).toHaveAttribute('scaleY', '1.5');
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('should render with default scale of 1', () => {
|
|
106
|
+
const { getByTestId } = render(<RectComponent {...defaultProps} />);
|
|
107
|
+
const group = getByTestId('group');
|
|
108
|
+
|
|
109
|
+
expect(group).toHaveAttribute('scaleX', '1');
|
|
110
|
+
expect(group).toHaveAttribute('scaleY', '1');
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
describe('interactions', () => {
|
|
115
|
+
it('should call onClick when clicked', () => {
|
|
116
|
+
const onClick = jest.fn();
|
|
117
|
+
const { container } = render(<RectComponent {...defaultProps} onClick={onClick} />);
|
|
118
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
119
|
+
const mainRect = rects[rects.length - 1];
|
|
120
|
+
|
|
121
|
+
fireEvent.click(mainRect);
|
|
122
|
+
|
|
123
|
+
expect(onClick).toHaveBeenCalledWith({
|
|
124
|
+
id: 'rect1',
|
|
125
|
+
selected: true,
|
|
126
|
+
selector: 'Mouse',
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
it('should toggle selection state on click', () => {
|
|
131
|
+
const onClick = jest.fn();
|
|
132
|
+
const { container, rerender } = render(<RectComponent {...defaultProps} onClick={onClick} selected={false} />);
|
|
133
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
134
|
+
const mainRect = rects[rects.length - 1];
|
|
135
|
+
|
|
136
|
+
fireEvent.click(mainRect);
|
|
137
|
+
|
|
138
|
+
expect(onClick).toHaveBeenCalledWith({
|
|
139
|
+
id: 'rect1',
|
|
140
|
+
selected: true,
|
|
141
|
+
selector: 'Mouse',
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
rerender(<RectComponent {...defaultProps} onClick={onClick} selected={true} />);
|
|
145
|
+
|
|
146
|
+
const rectsAfter = container.querySelectorAll('[data-testid="rect"]');
|
|
147
|
+
const mainRectAfter = rectsAfter[rectsAfter.length - 1];
|
|
148
|
+
fireEvent.click(mainRectAfter);
|
|
149
|
+
|
|
150
|
+
expect(onClick).toHaveBeenCalledWith({
|
|
151
|
+
id: 'rect1',
|
|
152
|
+
selected: false,
|
|
153
|
+
selector: 'Mouse',
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it('should not call onClick when disabled', () => {
|
|
158
|
+
const onClick = jest.fn();
|
|
159
|
+
const { container } = render(<RectComponent {...defaultProps} onClick={onClick} disabled={true} />);
|
|
160
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
161
|
+
const mainRect = rects[rects.length - 1];
|
|
162
|
+
|
|
163
|
+
fireEvent.click(mainRect);
|
|
164
|
+
|
|
165
|
+
expect(onClick).not.toHaveBeenCalled();
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
it('should change cursor to pointer on mouse enter when not disabled', () => {
|
|
169
|
+
const { container } = render(<RectComponent {...defaultProps} />);
|
|
170
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
171
|
+
const mainRect = rects[rects.length - 1];
|
|
172
|
+
|
|
173
|
+
fireEvent.mouseEnter(mainRect);
|
|
174
|
+
|
|
175
|
+
expect(document.body.style.cursor).toBe('pointer');
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
it('should not change cursor when disabled', () => {
|
|
179
|
+
const { container } = render(<RectComponent {...defaultProps} disabled={true} />);
|
|
180
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
181
|
+
const mainRect = rects[rects.length - 1];
|
|
182
|
+
|
|
183
|
+
fireEvent.mouseEnter(mainRect);
|
|
184
|
+
|
|
185
|
+
expect(document.body.style.cursor).toBe('default');
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
it('should reset cursor to default on mouse leave', () => {
|
|
189
|
+
const { container } = render(<RectComponent {...defaultProps} />);
|
|
190
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
191
|
+
const mainRect = rects[rects.length - 1];
|
|
192
|
+
|
|
193
|
+
fireEvent.mouseEnter(mainRect);
|
|
194
|
+
fireEvent.mouseLeave(mainRect);
|
|
195
|
+
|
|
196
|
+
expect(document.body.style.cursor).toBe('default');
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
describe('hover styling', () => {
|
|
201
|
+
it('should show hover outline when hoverOutlineColor is provided', () => {
|
|
202
|
+
const { container } = render(<RectComponent {...defaultProps} hoverOutlineColor="#FFFF00" />);
|
|
203
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
204
|
+
const mainRect = rects[rects.length - 1];
|
|
205
|
+
|
|
206
|
+
fireEvent.mouseEnter(mainRect);
|
|
207
|
+
|
|
208
|
+
const rectsAfterHover = container.querySelectorAll('[data-testid="rect"]');
|
|
209
|
+
expect(rectsAfterHover.length).toBeGreaterThan(1);
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
it('should not show hover outline when selected', () => {
|
|
213
|
+
const { container } = render(
|
|
214
|
+
<RectComponent {...defaultProps} selected={true} hoverOutlineColor="#FFFF00" />
|
|
215
|
+
);
|
|
216
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
217
|
+
const mainRect = rects[rects.length - 1];
|
|
218
|
+
|
|
219
|
+
fireEvent.mouseEnter(mainRect);
|
|
220
|
+
|
|
221
|
+
const hoverRect = container.querySelector('[stroke="#FFFF00"]');
|
|
222
|
+
if (hoverRect) {
|
|
223
|
+
expect(hoverRect).toHaveAttribute('stroke', 'transparent');
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
describe('evaluate mode', () => {
|
|
229
|
+
it('should show correct icon when correctly selected in evaluate mode', () => {
|
|
230
|
+
const { getByTestId } = render(
|
|
231
|
+
<RectComponent
|
|
232
|
+
{...defaultProps}
|
|
233
|
+
isEvaluateMode={true}
|
|
234
|
+
selected={true}
|
|
235
|
+
isCorrect={true}
|
|
236
|
+
showCorrectEnabled={false}
|
|
237
|
+
/>
|
|
238
|
+
);
|
|
239
|
+
|
|
240
|
+
const icon = getByTestId('icon-image');
|
|
241
|
+
expect(icon).toBeInTheDocument();
|
|
242
|
+
expect(icon).toHaveAttribute('data-src');
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
it('should show wrong icon when incorrectly selected in evaluate mode', () => {
|
|
246
|
+
const { getByTestId } = render(
|
|
247
|
+
<RectComponent
|
|
248
|
+
{...defaultProps}
|
|
249
|
+
isEvaluateMode={true}
|
|
250
|
+
selected={true}
|
|
251
|
+
isCorrect={false}
|
|
252
|
+
showCorrectEnabled={false}
|
|
253
|
+
/>
|
|
254
|
+
);
|
|
255
|
+
|
|
256
|
+
const icon = getByTestId('icon-image');
|
|
257
|
+
expect(icon).toBeInTheDocument();
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
it('should show wrong icon when incorrectly not selected', () => {
|
|
261
|
+
const { getByTestId } = render(
|
|
262
|
+
<RectComponent
|
|
263
|
+
{...defaultProps}
|
|
264
|
+
isEvaluateMode={true}
|
|
265
|
+
selected={false}
|
|
266
|
+
isCorrect={false}
|
|
267
|
+
showCorrectEnabled={false}
|
|
268
|
+
/>
|
|
269
|
+
);
|
|
270
|
+
|
|
271
|
+
const icon = getByTestId('icon-image');
|
|
272
|
+
expect(icon).toBeInTheDocument();
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
it('should not show icon when correctly not selected in evaluate mode', () => {
|
|
276
|
+
const { queryByTestId } = render(
|
|
277
|
+
<RectComponent
|
|
278
|
+
{...defaultProps}
|
|
279
|
+
isEvaluateMode={true}
|
|
280
|
+
selected={false}
|
|
281
|
+
isCorrect={true}
|
|
282
|
+
showCorrectEnabled={false}
|
|
283
|
+
/>
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
const icon = queryByTestId('icon-image');
|
|
287
|
+
expect(icon).not.toBeInTheDocument();
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
it('should show correct icon for showCorrect mode when correctly selected', () => {
|
|
291
|
+
const { getByTestId } = render(
|
|
292
|
+
<RectComponent
|
|
293
|
+
{...defaultProps}
|
|
294
|
+
isEvaluateMode={true}
|
|
295
|
+
selected={true}
|
|
296
|
+
isCorrect={true}
|
|
297
|
+
showCorrectEnabled={true}
|
|
298
|
+
/>
|
|
299
|
+
);
|
|
300
|
+
|
|
301
|
+
const icon = getByTestId('icon-image');
|
|
302
|
+
expect(icon).toBeInTheDocument();
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
it('should show correct icon for showCorrect mode when incorrectly not selected', () => {
|
|
306
|
+
const { getByTestId } = render(
|
|
307
|
+
<RectComponent
|
|
308
|
+
{...defaultProps}
|
|
309
|
+
isEvaluateMode={true}
|
|
310
|
+
selected={false}
|
|
311
|
+
isCorrect={false}
|
|
312
|
+
showCorrectEnabled={true}
|
|
313
|
+
/>
|
|
314
|
+
);
|
|
315
|
+
|
|
316
|
+
const icon = getByTestId('icon-image');
|
|
317
|
+
expect(icon).toBeInTheDocument();
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
it('should not show icon in showCorrect mode when correctly not selected', () => {
|
|
321
|
+
const { queryByTestId } = render(
|
|
322
|
+
<RectComponent
|
|
323
|
+
{...defaultProps}
|
|
324
|
+
isEvaluateMode={true}
|
|
325
|
+
selected={false}
|
|
326
|
+
isCorrect={true}
|
|
327
|
+
showCorrectEnabled={true}
|
|
328
|
+
/>
|
|
329
|
+
);
|
|
330
|
+
|
|
331
|
+
const icon = queryByTestId('icon-image');
|
|
332
|
+
expect(icon).not.toBeInTheDocument();
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
it('should not show icon in showCorrect mode when incorrectly selected', () => {
|
|
336
|
+
const { queryByTestId } = render(
|
|
337
|
+
<RectComponent
|
|
338
|
+
{...defaultProps}
|
|
339
|
+
isEvaluateMode={true}
|
|
340
|
+
selected={true}
|
|
341
|
+
isCorrect={false}
|
|
342
|
+
showCorrectEnabled={true}
|
|
343
|
+
/>
|
|
344
|
+
);
|
|
345
|
+
|
|
346
|
+
const icon = queryByTestId('icon-image');
|
|
347
|
+
expect(icon).not.toBeInTheDocument();
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
it('should show green outline when markAsCorrect is true', () => {
|
|
351
|
+
const { container } = render(
|
|
352
|
+
<RectComponent
|
|
353
|
+
{...defaultProps}
|
|
354
|
+
isEvaluateMode={true}
|
|
355
|
+
markAsCorrect={true}
|
|
356
|
+
/>
|
|
357
|
+
);
|
|
358
|
+
|
|
359
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
360
|
+
const mainRect = rects[rects.length - 1];
|
|
361
|
+
expect(mainRect).toHaveAttribute('stroke', 'green');
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
it('should show red outline when incorrect and not markAsCorrect', () => {
|
|
365
|
+
const { container } = render(
|
|
366
|
+
<RectComponent
|
|
367
|
+
{...defaultProps}
|
|
368
|
+
isEvaluateMode={true}
|
|
369
|
+
isCorrect={false}
|
|
370
|
+
markAsCorrect={false}
|
|
371
|
+
/>
|
|
372
|
+
);
|
|
373
|
+
|
|
374
|
+
const rects = container.querySelectorAll('[data-testid="rect"]');
|
|
375
|
+
const mainRect = rects[rects.length - 1];
|
|
376
|
+
expect(mainRect).toHaveAttribute('stroke', 'red');
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
it('should display evaluate text in tooltip', () => {
|
|
380
|
+
const { getByTestId } = render(
|
|
381
|
+
<RectComponent
|
|
382
|
+
{...defaultProps}
|
|
383
|
+
isEvaluateMode={true}
|
|
384
|
+
selected={true}
|
|
385
|
+
isCorrect={true}
|
|
386
|
+
evaluateText="Correct answer!"
|
|
387
|
+
showCorrectEnabled={false}
|
|
388
|
+
/>
|
|
389
|
+
);
|
|
390
|
+
|
|
391
|
+
const icon = getByTestId('icon-image');
|
|
392
|
+
expect(icon).toHaveAttribute('data-tooltip', 'Correct answer!');
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
describe('icon positioning', () => {
|
|
397
|
+
it('should position icon at center of rectangle', () => {
|
|
398
|
+
const { getByTestId } = render(
|
|
399
|
+
<RectComponent
|
|
400
|
+
{...defaultProps}
|
|
401
|
+
x={10}
|
|
402
|
+
y={20}
|
|
403
|
+
width={100}
|
|
404
|
+
height={80}
|
|
405
|
+
isEvaluateMode={true}
|
|
406
|
+
selected={true}
|
|
407
|
+
isCorrect={true}
|
|
408
|
+
showCorrectEnabled={false}
|
|
409
|
+
/>
|
|
410
|
+
);
|
|
411
|
+
|
|
412
|
+
const icon = getByTestId('icon-image');
|
|
413
|
+
// Icon should be centered: x + width/2 - 10, y + height/2 - 10
|
|
414
|
+
expect(icon).toHaveAttribute('data-x', '50'); // 10 + 100/2 - 10
|
|
415
|
+
expect(icon).toHaveAttribute('data-y', '50'); // 20 + 80/2 - 10
|
|
416
|
+
});
|
|
417
|
+
});
|
|
418
|
+
});
|
package/src/hotspot/circle.jsx
CHANGED
|
@@ -114,7 +114,6 @@ class CircleComponent extends React.Component {
|
|
|
114
114
|
onMouseEnter={this.handleMouseEnter}
|
|
115
115
|
x={x}
|
|
116
116
|
y={y}
|
|
117
|
-
opacity={0.5}
|
|
118
117
|
/>
|
|
119
118
|
{isEvaluateMode && iconSrc ? <ImageComponent src={iconSrc} x={iconX} y={iconY} tooltip={evaluateText} /> : null}
|
|
120
119
|
</Group>
|
package/src/hotspot/polygon.jsx
CHANGED
|
@@ -158,7 +158,6 @@ class PolygonComponent extends React.Component {
|
|
|
158
158
|
strokeWidth={useHoveredStyle && !selected ? 0 : outlineWidth}
|
|
159
159
|
onMouseLeave={this.handleMouseLeave}
|
|
160
160
|
onMouseEnter={this.handleMouseEnter}
|
|
161
|
-
opacity={0.5}
|
|
162
161
|
cursor='pointer'
|
|
163
162
|
position='relative'
|
|
164
163
|
/>
|
|
@@ -131,7 +131,6 @@ class RectComponent extends React.Component {
|
|
|
131
131
|
strokeWidth={useHoveredStyle && !selected ? 0 : outlineWidth}
|
|
132
132
|
onMouseLeave={this.handleMouseLeave}
|
|
133
133
|
onMouseEnter={this.handleMouseEnter}
|
|
134
|
-
opacity={0.5}
|
|
135
134
|
cursor="pointer"
|
|
136
135
|
/>
|
|
137
136
|
{isEvaluateMode && iconSrc ? <ImageComponent src={iconSrc} x={iconX} y={iconY} tooltip={evaluateText} /> : null}
|