@operato/board 1.0.0-beta.6 → 1.0.0-beta.9

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.0.0-beta.6",
3
+ "version": "1.0.0-beta.9",
4
4
  "description": "Webcomponent for board following open-wc recommendations",
5
5
  "author": "heartyoh",
6
6
  "license": "MIT",
@@ -49,17 +49,17 @@
49
49
  "storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
50
50
  },
51
51
  "dependencies": {
52
- "@operato/app": "^1.0.0-beta.6",
53
- "@operato/data-grist": "^1.0.0-beta.6",
54
- "@operato/font": "^1.0.0-beta.6",
55
- "@operato/graphql": "^1.0.0-beta.6",
56
- "@operato/i18n": "^1.0.0-beta.6",
57
- "@operato/input": "^1.0.0-beta.6",
58
- "@operato/markdown": "^1.0.0-beta.6",
59
- "@operato/popup": "^1.0.0-beta.6",
60
- "@operato/property-editor": "^1.0.0-beta.6",
61
- "@operato/styles": "^1.0.0-beta.6",
62
- "@operato/utils": "^1.0.0-beta.6",
52
+ "@operato/app": "^1.0.0-beta.9",
53
+ "@operato/data-grist": "^1.0.0-beta.9",
54
+ "@operato/font": "^1.0.0-beta.9",
55
+ "@operato/graphql": "^1.0.0-beta.9",
56
+ "@operato/i18n": "^1.0.0-beta.9",
57
+ "@operato/input": "^1.0.0-beta.9",
58
+ "@operato/markdown": "^1.0.0-beta.9",
59
+ "@operato/popup": "^1.0.0-beta.9",
60
+ "@operato/property-editor": "^1.0.0-beta.9",
61
+ "@operato/styles": "^1.0.0-beta.9",
62
+ "@operato/utils": "^1.0.0-beta.9",
63
63
  "@polymer/paper-dropdown-menu": "^3.2.0",
64
64
  "@types/file-saver": "^2.0.4",
65
65
  "@types/sortablejs": "^1.10.7",
@@ -71,7 +71,7 @@
71
71
  "devDependencies": {
72
72
  "@custom-elements-manifest/analyzer": "^0.4.17",
73
73
  "@hatiolab/prettier-config": "^1.0.0",
74
- "@hatiolab/things-scene": "^3.0.1",
74
+ "@hatiolab/things-scene": "^3.0.5",
75
75
  "@material/mwc-fab": "^0.25.3",
76
76
  "@material/mwc-icon": "^0.25.3",
77
77
  "@open-wc/eslint-config": "^4.3.0",
@@ -107,5 +107,5 @@
107
107
  "prettier --write"
108
108
  ]
109
109
  },
110
- "gitHead": "f2bbb8a0e4f5d31845c2d4dc8f7f2a1bc4915a19"
110
+ "gitHead": "606d63e98857aa60d32673f388a9e7cc5c8aa714"
111
111
  }
@@ -4,14 +4,13 @@
4
4
 
5
5
  import './component-detail'
6
6
 
7
- import { css, html, LitElement, PropertyValues } from 'lit'
7
+ import { LitElement, PropertyValues, css, html } from 'lit'
8
+ import { Pallet, PalletItem } from '../../types'
8
9
  import { customElement, property, query, state } from 'lit/decorators.js'
9
10
 
10
11
  import { Scene } from '@hatiolab/things-scene'
11
12
  import { ScrollbarStyles } from '@operato/styles'
12
13
 
13
- import { Pallet, PalletItem } from '../../types'
14
-
15
14
  const noImage = new URL('../../../../icons/components/no-image.png', import.meta.url).href
16
15
 
17
16
  @customElement('component-menu')
@@ -177,7 +176,7 @@ class ComponentMenu extends LitElement {
177
176
 
178
177
  if (this.scene) {
179
178
  this.template = this.templates.find(template => template.type == type)
180
- this.template && this.scene.add(JSON.parse(JSON.stringify(this.template.model)), { cx: 200, cy: 200 })
179
+ this.template && this.scene.startAddMode(JSON.parse(JSON.stringify(this.template.model)))
181
180
  }
182
181
 
183
182
  this.group = null
@@ -98,7 +98,7 @@ class ComponentToolbar extends LitElement {
98
98
 
99
99
  render() {
100
100
  const componentList = this.componentGroupList || []
101
- const modeIcon = this.icons[this.mode === SCENE_MODE.EDIT ? 'mode-edit' : 'mode-shift']
101
+ const modeIcon = this.icons[this.mode === SCENE_MODE.SHIFT ? 'mode-shift' : 'mode-edit']
102
102
 
103
103
  return html`
104
104
  <img id="shift" .src=${modeIcon} @click=${(e: MouseEvent) => this._onClickShift(e)} />
@@ -233,6 +233,8 @@ export default class OxSceneViewer extends LitElement {
233
233
 
234
234
  if (after === 2) {
235
235
  this.style.cursor = 'all-scroll'
236
+ } else if (after === 3) {
237
+ this.style.cursor = 'crosshair'
236
238
  } else {
237
239
  this.style.cursor = 'default'
238
240
  }
@@ -241,6 +241,7 @@ export class BoardModeller extends LitElement {
241
241
  >
242
242
  <ox-scene-layer type="selection-layer"></ox-scene-layer>
243
243
  <ox-scene-layer type="modeling-layer"></ox-scene-layer>
244
+ <ox-scene-layer type="add-layer"> </ox-scene-layer>
244
245
  <ox-scene-layer type="guide-layer">
245
246
  <ox-scene-property name="ruler" value="disabled"></ox-scene-property>
246
247
  </ox-scene-layer>