@operato/board 1.4.73 → 1.4.74

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": "@operato/board",
3
- "version": "1.4.73",
3
+ "version": "1.4.74",
4
4
  "description": "Webcomponent for board following open-wc recommendations",
5
5
  "author": "heartyoh",
6
6
  "main": "dist/src/index.js",
@@ -148,5 +148,5 @@
148
148
  "prettier --write"
149
149
  ]
150
150
  },
151
- "gitHead": "815c4b813f8c6a960867ef0aff00290bcba4041b"
151
+ "gitHead": "efb08a7edf07c1a1a2a87135436168f1c9065cc0"
152
152
  }
@@ -234,12 +234,22 @@ export default class OxSceneViewer extends LitElement {
234
234
  this._setMode(after)
235
235
  }
236
236
 
237
- if (after === 2) {
238
- this.style.cursor = 'all-scroll'
239
- } else if (after === 3) {
240
- this.style.cursor = 'crosshair'
241
- } else {
242
- this.style.cursor = 'default'
237
+ switch (after) {
238
+ case 1:
239
+ this.style.cursor = 'default'
240
+ break
241
+ case 2:
242
+ this.style.cursor = 'all-scroll'
243
+ break
244
+ case 3:
245
+ this.style.cursor = 'crosshair'
246
+ break
247
+ case 4:
248
+ this.style.cursor = 'copy'
249
+ break
250
+ case 5:
251
+ this.style.cursor = 'context-menu'
252
+ break
243
253
  }
244
254
  }
245
255
 
@@ -311,33 +311,9 @@ export class BoardModeller extends ScopedElementsMixin(LitElement) {
311
311
  updated(changes: PropertyValues<this>) {
312
312
  if (changes.has('scene')) {
313
313
  const old = changes.get('scene')
314
-
315
314
  if (old) {
316
- old.off('stylepastestart')
317
- old.off('stylepastestop')
318
- old.off('databindpastestart')
319
- old.off('databindpastestop')
320
-
321
- if (old) {
322
- old.stopStylePasteMode()
323
- old.stopDatabindPasteMode()
324
- }
325
- }
326
-
327
- const scene = this.scene
328
- if (scene) {
329
- this.scene?.on('stylepastestart', () => {
330
- this.viewer.style.cursor = 'copy'
331
- })
332
- this.scene?.on('stylepastestop', () => {
333
- this.viewer.style.cursor = 'default'
334
- })
335
- this.scene?.on('databindpastestart', () => {
336
- this.viewer.style.cursor = 'context-menu'
337
- })
338
- this.scene?.on('databindpastestop', () => {
339
- this.viewer.style.cursor = 'default'
340
- })
315
+ old.stopStylePasteMode()
316
+ old.stopDatabindPasteMode()
341
317
  }
342
318
  }
343
319
  }