@things-factory/board-ui 4.0.12 → 4.0.13
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.
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import '@material/mwc-fab'
|
|
2
2
|
import '@operato/board' // ox-board-viewer
|
|
3
|
-
import '@polymer/paper-dialog/paper-dialog'
|
|
4
3
|
import './scene-viewer/things-scene-viewer'
|
|
5
4
|
import './component-toolbar/component-toolbar'
|
|
6
5
|
import './property-sidebar/property-sidebar'
|
|
7
6
|
|
|
8
7
|
import { LitElement, css, html } from 'lit-element'
|
|
9
8
|
|
|
9
|
+
import { OxPopup } from '@operato/popup'
|
|
10
|
+
|
|
10
11
|
export class BoardModeller extends LitElement {
|
|
11
12
|
constructor() {
|
|
12
13
|
super()
|
|
@@ -63,6 +64,7 @@ export class BoardModeller extends LitElement {
|
|
|
63
64
|
flex-direction: row;
|
|
64
65
|
height: 100%;
|
|
65
66
|
overflow: hidden;
|
|
67
|
+
position: relative;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
#scene-wrap {
|
|
@@ -84,6 +86,26 @@ export class BoardModeller extends LitElement {
|
|
|
84
86
|
right: 15px;
|
|
85
87
|
bottom: 15px;
|
|
86
88
|
}
|
|
89
|
+
|
|
90
|
+
ox-popup {
|
|
91
|
+
width: 90%;
|
|
92
|
+
height: 90%;
|
|
93
|
+
left: 50%;
|
|
94
|
+
top: 50%;
|
|
95
|
+
transform: translateX(-50%) translateY(-50%);
|
|
96
|
+
background: var(--secondary-color, black);
|
|
97
|
+
|
|
98
|
+
display: flex;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
ox-board-viewer {
|
|
104
|
+
width: 98%;
|
|
105
|
+
height: 98%;
|
|
106
|
+
margin: auto;
|
|
107
|
+
padding: 0;
|
|
108
|
+
}
|
|
87
109
|
`
|
|
88
110
|
]
|
|
89
111
|
}
|
|
@@ -182,45 +204,15 @@ export class BoardModeller extends LitElement {
|
|
|
182
204
|
}
|
|
183
205
|
|
|
184
206
|
preview() {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
/*
|
|
188
|
-
* paper-dialog appears behind backdrop when inside a <app-header-layout ..
|
|
189
|
-
* https://github.com/PolymerElements/paper-dialog/issues/152
|
|
190
|
-
**/
|
|
191
|
-
|
|
192
|
-
var preview = document.createElement('ox-board-viewer')
|
|
193
|
-
|
|
194
|
-
preview.style.width = '100%'
|
|
195
|
-
preview.style.height = '100%'
|
|
196
|
-
preview.style.margin = '0'
|
|
197
|
-
preview.style.padding = '0'
|
|
198
|
-
preview.style.flex = 1
|
|
199
|
-
preview.provider = this.provider
|
|
200
|
-
preview.board = {
|
|
207
|
+
const board = {
|
|
201
208
|
id: 'preview',
|
|
202
|
-
model: this.
|
|
209
|
+
model: this.scene?.model ? JSON.parse(JSON.stringify(this.scene.model)) : null
|
|
203
210
|
}
|
|
204
|
-
preview.baseUrl = this.baseUrl
|
|
205
|
-
|
|
206
|
-
var dialog = document.createElement('paper-dialog')
|
|
207
|
-
|
|
208
|
-
dialog.style.width = '100%'
|
|
209
|
-
dialog.style.height = '100%'
|
|
210
|
-
dialog.style.display = 'flex'
|
|
211
|
-
dialog.style['flex-direction'] = 'column'
|
|
212
|
-
dialog.setAttribute('with-backdrop', true)
|
|
213
|
-
dialog.setAttribute('auto-fit-on-attach', true)
|
|
214
|
-
dialog.setAttribute('always-on-top', true)
|
|
215
|
-
dialog.addEventListener('iron-overlay-closed', () => {
|
|
216
|
-
preview.board = null
|
|
217
|
-
dialog.parentNode.removeChild(dialog)
|
|
218
|
-
})
|
|
219
211
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
212
|
+
OxPopup.open({
|
|
213
|
+
template: html` <ox-board-viewer .provider=${this.provider} .board=${board}></ox-board-viewer> `,
|
|
214
|
+
parent: this.renderRoot
|
|
215
|
+
})
|
|
224
216
|
|
|
225
217
|
requestAnimationFrame(() => {
|
|
226
218
|
dispatchEvent(new Event('resize'))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/board-ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.13",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -27,24 +27,23 @@
|
|
|
27
27
|
"@material/mwc-list": "^0.25.3",
|
|
28
28
|
"@material/mwc-select": "^0.25.3",
|
|
29
29
|
"@operato/board": "^0.2.43",
|
|
30
|
+
"@operato/popup": "^0.2.43",
|
|
30
31
|
"@polymer/iron-icon": "^3.0.1",
|
|
31
32
|
"@polymer/iron-icons": "^3.0.1",
|
|
32
33
|
"@polymer/paper-button": "^3.0.1",
|
|
33
|
-
"@polymer/paper-dialog": "^3.0.1",
|
|
34
|
-
"@polymer/paper-dialog-scrollable": "^3.0.1",
|
|
35
34
|
"@polymer/paper-dropdown-menu": "^3.0.1",
|
|
36
35
|
"@polymer/paper-icon-button": "^3.0.2",
|
|
37
36
|
"@polymer/paper-item": "^3.0.1",
|
|
38
37
|
"@polymer/paper-listbox": "^3.0.1",
|
|
39
38
|
"@polymer/paper-menu-button": "^3.0.1",
|
|
40
39
|
"@polymer/paper-slider": "^3.0.1",
|
|
41
|
-
"@things-factory/barcode-base": "^4.0.
|
|
42
|
-
"@things-factory/grist-ui": "^4.0.
|
|
43
|
-
"@things-factory/help": "^4.0.
|
|
44
|
-
"@things-factory/i18n-base": "^4.0.
|
|
45
|
-
"@things-factory/modeller-ui": "^4.0.
|
|
40
|
+
"@things-factory/barcode-base": "^4.0.13",
|
|
41
|
+
"@things-factory/grist-ui": "^4.0.13",
|
|
42
|
+
"@things-factory/help": "^4.0.13",
|
|
43
|
+
"@things-factory/i18n-base": "^4.0.13",
|
|
44
|
+
"@things-factory/modeller-ui": "^4.0.13",
|
|
46
45
|
"file-saver": "^2.0.2",
|
|
47
46
|
"sortablejs": "^1.10.2"
|
|
48
47
|
},
|
|
49
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "a542fdd4e7c447c3b571fe91c92f5919561bdc2c"
|
|
50
49
|
}
|