@fmsim/board 2.0.0-beta.10 → 2.0.0-beta.102
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/custom-elements.json +7903 -3748
- package/demo/index-modeller.html +1 -1
- package/demo/index-player.html +2 -2
- package/demo/index-viewer.html +2 -2
- package/demo/index.html +2 -2
- package/dist/src/component/etc.js +36 -0
- package/dist/src/component/etc.js.map +1 -1
- package/dist/src/component/index.d.ts +1 -0
- package/dist/src/component/index.js +1 -0
- package/dist/src/component/index.js.map +1 -1
- package/dist/src/component/restful-property-editor-backdrop-faces.d.ts +50 -0
- package/dist/src/component/restful-property-editor-backdrop-faces.js +524 -0
- package/dist/src/component/restful-property-editor-backdrop-faces.js.map +1 -0
- package/dist/src/data-storage/board-model-cache.d.ts +13 -0
- package/dist/src/data-storage/board-model-cache.js +66 -0
- package/dist/src/data-storage/board-model-cache.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/layers/mcs-mouse-event-handler.js +8 -0
- package/dist/src/layers/mcs-mouse-event-handler.js.map +1 -1
- package/dist/src/layers/movement-layer.d.ts +4 -4
- package/dist/src/layers/movement-layer.js +16 -8
- package/dist/src/layers/movement-layer.js.map +1 -1
- package/dist/src/modeller/bulk-create-dialog.d.ts +51 -0
- package/dist/src/modeller/bulk-create-dialog.js +531 -0
- package/dist/src/modeller/bulk-create-dialog.js.map +1 -0
- package/dist/src/modeller/bulk-create.d.ts +101 -0
- package/dist/src/modeller/bulk-create.js +199 -0
- package/dist/src/modeller/bulk-create.js.map +1 -0
- package/dist/src/modeller/component-toolbar/component-menu.d.ts +1 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.d.ts +1 -1
- package/dist/src/modeller/edit-toolbar.d.ts +13 -0
- package/dist/src/modeller/edit-toolbar.js +168 -7
- package/dist/src/modeller/edit-toolbar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/abstract-property.js +10 -2
- package/dist/src/modeller/property-sidebar/abstract-property.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects.d.ts +10 -1
- package/dist/src/modeller/property-sidebar/effects/effects.js +66 -1
- package/dist/src/modeller/property-sidebar/effects/effects.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/event-handler-adapter.d.ts +44 -0
- package/dist/src/modeller/property-sidebar/effects/event-handler-adapter.js +70 -0
- package/dist/src/modeller/property-sidebar/effects/event-handler-adapter.js.map +1 -0
- package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +13 -3
- package/dist/src/modeller/property-sidebar/effects/property-event.js +20 -11
- package/dist/src/modeller/property-sidebar/effects/property-event.js.map +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector-controller.d.ts +62 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-controller.js +276 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-controller.js.map +1 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-group-view.d.ts +15 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-group-view.js +56 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-group-view.js.map +1 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-highlight.d.ts +7 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-highlight.js +25 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-highlight.js.map +1 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-model.d.ts +44 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-model.js +72 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-model.js.map +1 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-tree-view.d.ts +18 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-tree-view.js +61 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector-tree-view.js.map +1 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +17 -12
- package/dist/src/modeller/property-sidebar/inspector/inspector.js +281 -151
- package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -1
- package/dist/src/modeller/property-sidebar/property-sidebar.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/shapes/ox-input-entity-id.d.ts +75 -0
- package/dist/src/modeller/property-sidebar/shapes/ox-input-entity-id.js +346 -0
- package/dist/src/modeller/property-sidebar/shapes/ox-input-entity-id.js.map +1 -0
- package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +22 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.js +94 -2
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.d.ts +25 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.js +112 -2
- package/dist/src/modeller/property-sidebar/specifics/specifics.js.map +1 -1
- package/dist/src/modeller/property-sidebar/styles/styles.d.ts +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-layer.d.ts +4 -3
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js +2 -1
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.d.ts +2 -1
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js +5 -1
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js.map +1 -1
- package/dist/src/ox-board-component-info.d.ts +1 -0
- package/dist/src/ox-board-component-info.js +42 -2
- package/dist/src/ox-board-component-info.js.map +1 -1
- package/dist/src/ox-board-modeller.d.ts +6 -3
- package/dist/src/ox-board-modeller.js +21 -1
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/src/ox-board-viewer.d.ts +125 -13
- package/dist/src/ox-board-viewer.js +793 -97
- package/dist/src/ox-board-viewer.js.map +1 -1
- package/dist/src/ox-editor-board-selector.d.ts +3 -0
- package/dist/src/ox-editor-board-selector.js +38 -9
- package/dist/src/ox-editor-board-selector.js.map +1 -1
- package/dist/src/ox-playback-controls.d.ts +157 -0
- package/dist/src/ox-playback-controls.js +1089 -0
- package/dist/src/ox-playback-controls.js.map +1 -0
- package/dist/src/playback/carrier-tracking-store.d.ts +51 -0
- package/dist/src/playback/carrier-tracking-store.js +115 -0
- package/dist/src/playback/carrier-tracking-store.js.map +1 -0
- package/dist/src/playback/playback-engine.d.ts +106 -0
- package/dist/src/playback/playback-engine.js +395 -0
- package/dist/src/playback/playback-engine.js.map +1 -0
- package/dist/src/scene-monitor-renderer.d.ts +10 -0
- package/dist/src/scene-monitor-renderer.js +226 -0
- package/dist/src/scene-monitor-renderer.js.map +1 -0
- package/dist/src/selector/ox-board-selector.js +12 -1
- package/dist/src/selector/ox-board-selector.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/icons/components/text.png +0 -0
- package/icons/fab/mode-2d.svg +25 -0
- package/icons/fab/mode-3d.svg +25 -0
- package/icons/fab/playback-play.svg +49 -0
- package/icons/fab/playback-stop.svg +50 -0
- package/package.json +8 -4
|
@@ -1,17 +1,28 @@
|
|
|
1
|
+
var BoardViewer_1;
|
|
1
2
|
import { __decorate } from "tslib";
|
|
2
3
|
import '@material/web/fab/fab.js';
|
|
3
4
|
import '@material/web/icon/icon.js';
|
|
4
5
|
import './layers/movement-layer.js';
|
|
5
6
|
import './ox-board-component-info.js';
|
|
6
7
|
import './layers/mcs-mouse-event-handler.js';
|
|
7
|
-
import
|
|
8
|
+
import './ox-playback-controls.js';
|
|
9
|
+
import { css, html, LitElement, nothing } from 'lit';
|
|
8
10
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
+
import { PlaybackEngine } from './playback/playback-engine.js';
|
|
12
|
+
import { CarrierTrackingStore } from './playback/carrier-tracking-store.js';
|
|
13
|
+
import { create, LoadTracker, LoadingOverlay, SCENE_MODE, dataLagTracker } from '@hatiolab/things-scene';
|
|
14
|
+
import { isIOS, fullscreen, exitfullscreen, togglefullscreen } from '@operato/utils';
|
|
11
15
|
import { ScrollbarStyles } from '@operato/styles';
|
|
12
16
|
import { DataStorage } from './data-storage/data-storage.js';
|
|
13
17
|
import { runScenario, startScenario, DataSubscriptionProviderImpl, isRestfulAvailable } from '@fmsim/api';
|
|
14
|
-
|
|
18
|
+
import { SceneMonitorRenderer } from './scene-monitor-renderer.js';
|
|
19
|
+
// FAB 아이콘 — packages/board/icons/fab/ 의 외부 SVG asset 로 분리.
|
|
20
|
+
// 기존엔 inline SVG 였으나 (a) 가독성 향상, (b) 디자이너 단독 수정, (c) 캐시 활용 목적.
|
|
21
|
+
const ICON_FAB_PLAYBACK_PLAY = new URL('../../icons/fab/playback-play.svg', import.meta.url).href;
|
|
22
|
+
const ICON_FAB_PLAYBACK_STOP = new URL('../../icons/fab/playback-stop.svg', import.meta.url).href;
|
|
23
|
+
const ICON_FAB_MODE_2D = new URL('../../icons/fab/mode-2d.svg', import.meta.url).href;
|
|
24
|
+
const ICON_FAB_MODE_3D = new URL('../../icons/fab/mode-3d.svg', import.meta.url).href;
|
|
25
|
+
let BoardViewer = BoardViewer_1 = class BoardViewer extends LitElement {
|
|
15
26
|
constructor() {
|
|
16
27
|
var _a;
|
|
17
28
|
super(...arguments);
|
|
@@ -24,6 +35,8 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
24
35
|
this._forward = [];
|
|
25
36
|
this._backward = [];
|
|
26
37
|
this._oldtarget = null;
|
|
38
|
+
this._fabExpanded = false;
|
|
39
|
+
this._playbackActive = false;
|
|
27
40
|
this.currentBoardId = (_a = this.board) === null || _a === void 0 ? void 0 : _a.id;
|
|
28
41
|
this.popup = null;
|
|
29
42
|
this.lastComponent = null;
|
|
@@ -40,9 +53,16 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
40
53
|
};
|
|
41
54
|
// 모니터링에서 Movement Data를 보여준다.
|
|
42
55
|
this.fmbShowMovementHandler = (e) => {
|
|
43
|
-
var _a;
|
|
56
|
+
var _a, _b, _c;
|
|
57
|
+
// 플레이백 중에는 외부 모니터링이 보내는 실시간 반송 정보를 그리지 않는다 —
|
|
58
|
+
// 사용자가 플레이백 시점의 *과거 상태* 를 보고 있는데 실시간 화살표가 겹치면
|
|
59
|
+
// 혼란을 줌. (백엔드 상세 정보 요청은 ox-board-component-info.ts:225 에서
|
|
60
|
+
// 같은 playbackMode 가드로 이미 차단됨.)
|
|
61
|
+
if ((_b = (_a = this._scene) === null || _a === void 0 ? void 0 : _a.rootContainer) === null || _b === void 0 ? void 0 : _b.playbackMode) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
44
64
|
const movement = e.detail.value;
|
|
45
|
-
const movementLayer = (
|
|
65
|
+
const movementLayer = (_c = this._scene) === null || _c === void 0 ? void 0 : _c.findById(`movement-layer`);
|
|
46
66
|
if (!movementLayer) {
|
|
47
67
|
return;
|
|
48
68
|
}
|
|
@@ -106,26 +126,25 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
106
126
|
floatingContainer.hidden = true;
|
|
107
127
|
}
|
|
108
128
|
};
|
|
109
|
-
// BoardComponentInfo popup을
|
|
129
|
+
// BoardComponentInfo popup 을 보여주고 deco-border 로 selected highlight.
|
|
130
|
+
// 영구 추적과는 독립 — query-submit 핸들러 (onQuerySubmit) 가 별도로 담당.
|
|
110
131
|
this.clickComponentHandler = (e) => {
|
|
111
|
-
var _a, _b;
|
|
112
132
|
const component = e.detail;
|
|
113
133
|
const { type } = component.state;
|
|
114
134
|
if (type == 'model-layer') {
|
|
115
|
-
|
|
116
|
-
// this.lastComponent?.trigger('deco-arrow-reset')
|
|
135
|
+
this._clearClickHighlight();
|
|
117
136
|
this.hidePopup();
|
|
118
137
|
return;
|
|
119
138
|
}
|
|
120
139
|
if ('isLVComponent' in component) {
|
|
121
|
-
|
|
122
|
-
// this.lastComponent?.trigger('deco-arrow-reset')
|
|
140
|
+
this._clearClickHighlight();
|
|
123
141
|
this.lastComponent = component;
|
|
124
142
|
component.trigger('deco-border', { distance: 8, lineWidth: 4, color: '#f007' });
|
|
125
|
-
// component.trigger('deco-arrow', { color: 'red', animation: true, size: 20 })
|
|
126
143
|
this.togglePopup(component);
|
|
127
144
|
}
|
|
128
145
|
};
|
|
146
|
+
// 영구 추적 라이프사이클은 things-scene 의 Scene.tracker 가 일괄 관리.
|
|
147
|
+
// (polling, deco-border 부착/해제, 3D outline 색 동기화, centerTo)
|
|
129
148
|
this.fmbStartAnimation = (e) => {
|
|
130
149
|
var _a;
|
|
131
150
|
const { target, animation, decorator, border, arrow } = e.detail || {};
|
|
@@ -172,22 +191,106 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
172
191
|
var _a;
|
|
173
192
|
(_a = this._scene) === null || _a === void 0 ? void 0 : _a.root.trigger('deco-reset');
|
|
174
193
|
};
|
|
194
|
+
/**
|
|
195
|
+
* 스토커 게이지 표시 모드 전환 (런타임 전용, 비영속).
|
|
196
|
+
* 외부: window.dispatchEvent(new CustomEvent('fmbSetStockerGaugeMode', { detail: { mode } }))
|
|
197
|
+
* mode: 'capacity'(기본) | 'carrier' | 'abnormal'. RootContainer.stockerGaugeMode setter 가
|
|
198
|
+
* 2D 리드로우 + 3D 게이지 재빌드를 트리거한다(fmsim/machine root-container-override).
|
|
199
|
+
* 미지값은 무시 — state 오염 방지(render 는 미지값을 capacity 로 폴백하지만 명시 게이트).
|
|
200
|
+
*
|
|
201
|
+
* 반드시 rootContainer(=RootContainer, isRoot()===true)에 설정해야 한다. scene.root 는
|
|
202
|
+
* model_layer(Layer)라 override 가 없고, 컴포넌트의 this.root 는 RootContainer 로 해석되므로
|
|
203
|
+
* scene.root 에 쓰면 죽은 속성만 박히고 게이지에 반영되지 않는다.
|
|
204
|
+
*/
|
|
205
|
+
this.fmbSetStockerGaugeModeHandler = (e) => {
|
|
206
|
+
var _a, _b;
|
|
207
|
+
const mode = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.mode;
|
|
208
|
+
if (mode !== 'capacity' && mode !== 'carrier' && mode !== 'abnormal') {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const rootContainer = (_b = this._scene) === null || _b === void 0 ? void 0 : _b.rootContainer;
|
|
212
|
+
if (rootContainer) {
|
|
213
|
+
rootContainer.stockerGaugeMode = mode;
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
this._pointerMoveHandler = () => this.transientShowButtons();
|
|
217
|
+
/**
|
|
218
|
+
* playback 모드는 전체화면 모드와 한 몸 — 어떤 경로로든 전체화면이 해제되면
|
|
219
|
+
* playback 도 함께 종료. (단독 전체화면 토글은 기존처럼 동작하도록 `_playbackActive` 가드.)
|
|
220
|
+
*/
|
|
221
|
+
this._fullscreenChangeHandler = () => {
|
|
222
|
+
if (!document.fullscreenElement && this._playbackActive) {
|
|
223
|
+
this._onPlaybackStop();
|
|
224
|
+
}
|
|
225
|
+
};
|
|
175
226
|
this.resizeHandler = () => {
|
|
176
227
|
this._scene && this._scene.fit();
|
|
177
228
|
};
|
|
229
|
+
// ── Data Subscription ──
|
|
230
|
+
this._dataSubscriptionProvider = isRestfulAvailable() ? undefined : new DataSubscriptionProviderImpl();
|
|
231
|
+
/**
|
|
232
|
+
* 영구추적 fallback 데이터 캐시 — 플레이백 윈도우 × carrierName 단위로
|
|
233
|
+
* carrier 위치 이력을 보관. carrier 가 scene 에 직접 안 보일 때
|
|
234
|
+
* Tracker fallback 콜백이 lookupAt 으로 머신/유닛을 찾아 반환.
|
|
235
|
+
*/
|
|
236
|
+
this._carrierTrackingStore = new CarrierTrackingStore();
|
|
237
|
+
/**
|
|
238
|
+
* fallback 결과(target 컴포넌트) dedupe — 직전과 동일한 target 일 땐 로그 skip
|
|
239
|
+
* + deco-arrow 라이프사이클 (target 변경 시 이전 끄고 새로 부착).
|
|
240
|
+
*/
|
|
241
|
+
this._lastFallbackTarget = null;
|
|
242
|
+
/** _resolveCarrierFallback 마지막 호출 timestamp — carrier 발견 감지용. */
|
|
243
|
+
this._lastFallbackResolvedAt = 0;
|
|
244
|
+
}
|
|
245
|
+
get _is3dMode() {
|
|
246
|
+
var _a, _b, _c;
|
|
247
|
+
return !!((_c = (_b = (_a = this._scene) === null || _a === void 0 ? void 0 : _a.root) === null || _b === void 0 ? void 0 : _b.rootModel) === null || _c === void 0 ? void 0 : _c.is3dMode);
|
|
178
248
|
}
|
|
179
249
|
render() {
|
|
180
|
-
var
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
250
|
+
var _a, _b;
|
|
251
|
+
var fabGroup = this.hideFullscreen
|
|
252
|
+
? html ``
|
|
253
|
+
: html `
|
|
254
|
+
<div
|
|
255
|
+
fab-group
|
|
256
|
+
?expanded=${this._fabExpanded}
|
|
185
257
|
@mouseover=${(e) => this.transientShowButtons(true)}
|
|
186
258
|
@mouseout=${(e) => this.transientShowButtons()}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
259
|
+
>
|
|
260
|
+
<md-fab
|
|
261
|
+
class="main-fab"
|
|
262
|
+
?expanded=${this._fabExpanded}
|
|
263
|
+
@click=${() => { this._fabExpanded = !this._fabExpanded; }}
|
|
264
|
+
title="menu"
|
|
265
|
+
><md-icon slot="icon">add</md-icon></md-fab>
|
|
266
|
+
|
|
267
|
+
${isIOS() ? nothing : html `<md-fab
|
|
268
|
+
class="sub-fab"
|
|
269
|
+
@click=${() => { this._fabExpanded = false; this.onTapFullscreen(); }}
|
|
270
|
+
title="fullscreen"
|
|
271
|
+
><md-icon slot="icon">${document.fullscreenElement ? 'fullscreen_exit' : 'fullscreen'}</md-icon></md-fab>`}
|
|
272
|
+
|
|
273
|
+
<md-fab
|
|
274
|
+
class="sub-fab"
|
|
275
|
+
@click=${() => { this._fabExpanded = false; this.onTapPlayback(); }}
|
|
276
|
+
title=${this._playbackActive ? 'stop playback' : 'start playback'}
|
|
277
|
+
><span slot="icon" class="fab-icon-wrap"><img
|
|
278
|
+
class="fab-icon"
|
|
279
|
+
src=${this._playbackActive ? ICON_FAB_PLAYBACK_STOP : ICON_FAB_PLAYBACK_PLAY}
|
|
280
|
+
alt=${this._playbackActive ? 'stop playback' : 'start playback'}
|
|
281
|
+
/></span></md-fab>
|
|
282
|
+
|
|
283
|
+
<md-fab
|
|
284
|
+
class="sub-fab"
|
|
285
|
+
@click=${() => { this._fabExpanded = false; this.onTapToggle3D(); }}
|
|
286
|
+
title=${this._is3dMode ? '2D mode' : '3D mode'}
|
|
287
|
+
><span slot="icon" class="fab-icon-wrap"><img
|
|
288
|
+
class="fab-icon"
|
|
289
|
+
src=${this._is3dMode ? ICON_FAB_MODE_2D : ICON_FAB_MODE_3D}
|
|
290
|
+
alt=${this._is3dMode ? '2D mode' : '3D mode'}
|
|
291
|
+
/></span></md-fab>
|
|
292
|
+
</div>
|
|
293
|
+
`;
|
|
191
294
|
var prev = !this.hideNavigation
|
|
192
295
|
? html `
|
|
193
296
|
<md-icon
|
|
@@ -215,74 +318,107 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
215
318
|
return html `
|
|
216
319
|
${prev}
|
|
217
320
|
|
|
218
|
-
<div
|
|
219
|
-
id="target"
|
|
220
|
-
@touchstart=${(e) => this.transientShowButtons()}
|
|
221
|
-
@mousemove=${(e) => this.transientShowButtons()}
|
|
222
|
-
></div>
|
|
321
|
+
<div id="target"></div>
|
|
223
322
|
|
|
224
323
|
<slot></slot>
|
|
225
|
-
${next} ${
|
|
324
|
+
${next} ${fabGroup}
|
|
325
|
+
|
|
326
|
+
${this._playbackActive
|
|
327
|
+
? html `<ox-playback-controls
|
|
328
|
+
.playbackState=${((_a = this._playbackEngine) === null || _a === void 0 ? void 0 : _a.state) === 'playing' ? 'playing' : ((_b = this._playbackEngine) === null || _b === void 0 ? void 0 : _b.state) === 'paused' ? 'paused' : 'idle'}
|
|
329
|
+
@playback-start=${this._onPlaybackStart}
|
|
330
|
+
@playback-pause=${this._onPlaybackPause}
|
|
331
|
+
@playback-resume=${this._onPlaybackResume}
|
|
332
|
+
@playback-stop=${this._onPlaybackStop}
|
|
333
|
+
@playback-seek=${this._onPlaybackSeek}
|
|
334
|
+
@playback-seek-start=${this._onPlaybackSeekStart}
|
|
335
|
+
@playback-seek-preview=${this._onPlaybackSeekPreview}
|
|
336
|
+
@playback-speed=${this._onPlaybackSpeed}
|
|
337
|
+
></ox-playback-controls>`
|
|
338
|
+
: nothing}
|
|
226
339
|
`;
|
|
227
340
|
}
|
|
341
|
+
/** 마우스 클릭/popup 의 selected highlight 해제. */
|
|
342
|
+
_clearClickHighlight() {
|
|
343
|
+
if (this.lastComponent) {
|
|
344
|
+
this.lastComponent.trigger('deco-border-off');
|
|
345
|
+
this.lastComponent = null;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
/** connect/disconnect 시 일괄 등록/해제할 window 이벤트 목록 (모니터링 연동) */
|
|
349
|
+
get _monitoringEvents() {
|
|
350
|
+
return [
|
|
351
|
+
['fetchIFactsData', this.fetchIFactsDataHandler], // 장비 아이디 object를 캔버스 가운데로
|
|
352
|
+
['fmbShowMovement', this.fmbShowMovementHandler], // Movement Data 표시
|
|
353
|
+
['fmbMonitoringInit', this.fmbMonitoringInitHandler], // 보드 상태 정사이즈 복원
|
|
354
|
+
['clickComponent', this.clickComponentHandler], // BoardComponentInfo popup
|
|
355
|
+
['fmbStartAnimation', this.fmbStartAnimation], // AnimatedIcon 추가/제거
|
|
356
|
+
['fmbStopAnimation', this.fmbStopAnimation],
|
|
357
|
+
['fmbResetAnimation', this.fmbResetAnimation],
|
|
358
|
+
['fmbShowLegend', this.fmbShowLegendHandler], // 범례 표시
|
|
359
|
+
['fmbHideLegend', this.fmbHideLegendHandler],
|
|
360
|
+
['fmbShowPopup', this.fmbShowPopupHandler], // 팝업 표시
|
|
361
|
+
['fmbHidePopup', this.fmbHidePopupHandler],
|
|
362
|
+
['fmbShowFloatingContainer', this.fmbShowFloatingContainerHandler], // FloatingContainer
|
|
363
|
+
['fmbHideFloatingContainer', this.fmbHideFloatingContainerHandler],
|
|
364
|
+
['fmbSetStockerGaugeMode', this.fmbSetStockerGaugeModeHandler] // 스토커 게이지 모드 전환
|
|
365
|
+
];
|
|
366
|
+
}
|
|
228
367
|
connectedCallback() {
|
|
229
368
|
super.connectedCallback();
|
|
230
369
|
window.addEventListener('resize', this.resizeHandler);
|
|
370
|
+
// 3D 모드에서도 마우스 움직임 감지 (document 레벨, capture phase)
|
|
371
|
+
document.addEventListener('pointermove', this._pointerMoveHandler, true);
|
|
372
|
+
document.addEventListener('fullscreenchange', this._fullscreenChangeHandler);
|
|
373
|
+
document.addEventListener('webkitfullscreenchange', this._fullscreenChangeHandler);
|
|
231
374
|
this.renderRoot.addEventListener('close-scene', e => {
|
|
232
375
|
e.preventDefault();
|
|
233
376
|
this.onTapPrev();
|
|
234
377
|
}, false);
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
window.addEventListener('fmbShowMovement', this.fmbShowMovementHandler);
|
|
239
|
-
// 모니터링에서 보드 상태를 원래상태 (정사이즈)로 돌려놓는다.
|
|
240
|
-
window.addEventListener('fmbMonitoringInit', this.fmbMonitoringInitHandler);
|
|
241
|
-
// BoardComponentInfo popup을 보여준다.
|
|
242
|
-
window.addEventListener('clickComponent', this.clickComponentHandler);
|
|
243
|
-
// AnimatedIcon 을 추가하거나 제거한다.
|
|
244
|
-
window.addEventListener('fmbStartAnimation', this.fmbStartAnimation);
|
|
245
|
-
window.addEventListener('fmbStopAnimation', this.fmbStopAnimation);
|
|
246
|
-
window.addEventListener('fmbResetAnimation', this.fmbResetAnimation);
|
|
247
|
-
// 모니터링에서 범례를 보여준다.
|
|
248
|
-
window.addEventListener('fmbShowLegend', this.fmbShowLegendHandler);
|
|
249
|
-
window.addEventListener('fmbHideLegend', this.fmbHideLegendHandler);
|
|
250
|
-
// 모니터링에서 범례를 보여준다.
|
|
251
|
-
window.addEventListener('fmbShowPopup', this.fmbShowPopupHandler);
|
|
252
|
-
window.addEventListener('fmbHidePopup', this.fmbHidePopupHandler);
|
|
253
|
-
// 모니터링에서 FloatingContainer를 보여준다.
|
|
254
|
-
window.addEventListener('fmbShowFloatingContainer', this.fmbShowFloatingContainerHandler);
|
|
255
|
-
window.addEventListener('fmbHideFloatingContainer', this.fmbHideFloatingContainerHandler);
|
|
378
|
+
for (const [type, handler] of this._monitoringEvents) {
|
|
379
|
+
window.addEventListener(type, handler);
|
|
380
|
+
}
|
|
256
381
|
}
|
|
257
382
|
disconnectedCallback() {
|
|
383
|
+
var _a, _b, _c, _d, _e;
|
|
258
384
|
super.disconnectedCallback();
|
|
259
385
|
window.removeEventListener('resize', this.resizeHandler);
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
//
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
386
|
+
document.removeEventListener('pointermove', this._pointerMoveHandler, true);
|
|
387
|
+
document.removeEventListener('fullscreenchange', this._fullscreenChangeHandler);
|
|
388
|
+
document.removeEventListener('webkitfullscreenchange', this._fullscreenChangeHandler);
|
|
389
|
+
for (const [type, handler] of this._monitoringEvents) {
|
|
390
|
+
window.removeEventListener(type, handler);
|
|
391
|
+
}
|
|
392
|
+
this._clearClickHighlight();
|
|
393
|
+
(_b = (_a = this._scene) === null || _a === void 0 ? void 0 : _a.tracker) === null || _b === void 0 ? void 0 : _b.stop();
|
|
394
|
+
// 플레이백이 활성 상태면 명시적 stop (provider resume 포함)
|
|
395
|
+
if (this._playbackActive) {
|
|
396
|
+
(_c = this._playbackEngine) === null || _c === void 0 ? void 0 : _c.stop();
|
|
397
|
+
(_d = this._playbackEngine) === null || _d === void 0 ? void 0 : _d.detachScene();
|
|
398
|
+
(_e = this._dataSubscriptionProvider) === null || _e === void 0 ? void 0 : _e.resume();
|
|
399
|
+
this._playbackActive = false;
|
|
400
|
+
}
|
|
401
|
+
this._playbackWindow = undefined;
|
|
402
|
+
this._carrierTrackingStore.clear();
|
|
403
|
+
this._clearFallbackArrow();
|
|
404
|
+
this._stopFallbackArrowMonitor();
|
|
405
|
+
if (this._playbackEngine) {
|
|
406
|
+
this._playbackEngine.dispose();
|
|
407
|
+
this._playbackEngine = undefined;
|
|
408
|
+
}
|
|
282
409
|
this.closeScene();
|
|
283
410
|
}
|
|
284
411
|
updated(changes) {
|
|
412
|
+
// loadTracker가 외부에서 전달되면 즉시 overlay 연결 (fetch 중에도 표시)
|
|
413
|
+
if (changes.has('loadTracker') && this.loadTracker) {
|
|
414
|
+
this._ensureOverlay(this.loadTracker);
|
|
415
|
+
}
|
|
285
416
|
if (changes.has('board')) {
|
|
417
|
+
// tracker: 외부에서 안 왔으면 여기서 생성
|
|
418
|
+
if (!this.loadTracker) {
|
|
419
|
+
this.loadTracker = new LoadTracker();
|
|
420
|
+
this._ensureOverlay(this.loadTracker);
|
|
421
|
+
}
|
|
286
422
|
this.hidePopup();
|
|
287
423
|
this.closeScene();
|
|
288
424
|
if (this.board && this.board.id) {
|
|
@@ -302,33 +438,48 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
302
438
|
}
|
|
303
439
|
}
|
|
304
440
|
async initSceneAsync() {
|
|
305
|
-
if (!this.board || !this.board.id)
|
|
441
|
+
if (!this.board || !this.board.id || !this.provider)
|
|
306
442
|
return;
|
|
307
|
-
|
|
308
|
-
|
|
443
|
+
try {
|
|
444
|
+
this._scene = await this.provider.create(this.board.id);
|
|
445
|
+
this.setupScene({ id: this.board.id, scene: this._scene });
|
|
446
|
+
}
|
|
447
|
+
catch (e) {
|
|
448
|
+
console.error('Failed to load scene:', this.board.id, e);
|
|
449
|
+
}
|
|
309
450
|
}
|
|
310
451
|
initScene() {
|
|
311
|
-
if (!this.board || !this.board.id) {
|
|
452
|
+
if (!this.board || !this.board.id || !this.board.model) {
|
|
312
453
|
return;
|
|
313
454
|
}
|
|
314
455
|
this._scene = create({
|
|
315
|
-
model:
|
|
316
|
-
...this.board.model
|
|
317
|
-
},
|
|
456
|
+
model: JSON.parse(JSON.stringify(this.board.model)),
|
|
318
457
|
style: this.board.style,
|
|
319
458
|
mode: SCENE_MODE.VIEW,
|
|
320
459
|
handlers: ['mcs-event-handler', 'zoom-handler', 'shift-handler', 'waypoint-handler'],
|
|
321
460
|
layers: [{ type: 'scroll-layer' }, { type: 'movement-layer', id: 'movement-layer' }],
|
|
322
461
|
refProvider: this.provider,
|
|
323
462
|
dataStorage: this.board.id !== 'preview' ? new DataStorage(this.board.id) : undefined,
|
|
324
|
-
dataSubscriptionProvider:
|
|
463
|
+
dataSubscriptionProvider: this._dataSubscriptionProvider,
|
|
464
|
+
loading: this.loadTracker ? { tracker: this.loadTracker } : undefined
|
|
325
465
|
});
|
|
326
466
|
if (this.baseUrl) {
|
|
327
467
|
this._scene.baseUrl = this.baseUrl;
|
|
328
468
|
}
|
|
329
469
|
this.setupScene({ id: this.board.id, scene: this._scene });
|
|
330
470
|
}
|
|
471
|
+
_ensureOverlay(tracker) {
|
|
472
|
+
if (!this._loadingOverlay) {
|
|
473
|
+
this._loadingOverlay = new LoadingOverlay();
|
|
474
|
+
this._loadingOverlay.renderer = new SceneMonitorRenderer();
|
|
475
|
+
}
|
|
476
|
+
this._loadingOverlay.attach(this.renderRoot, tracker, dataLagTracker);
|
|
477
|
+
}
|
|
331
478
|
closeScene() {
|
|
479
|
+
var _a, _b;
|
|
480
|
+
// scene 교체/종료 시 highlight 상태도 함께 정리. tracking watcher 누수 방지.
|
|
481
|
+
this._clearClickHighlight();
|
|
482
|
+
(_b = (_a = this._scene) === null || _a === void 0 ? void 0 : _a.tracker) === null || _b === void 0 ? void 0 : _b.stop();
|
|
332
483
|
if (this._scene) {
|
|
333
484
|
this.unbindSceneEvents(this._scene);
|
|
334
485
|
this._scene.target = null;
|
|
@@ -347,7 +498,15 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
347
498
|
}
|
|
348
499
|
setupScene({ id, scene }) {
|
|
349
500
|
var _a;
|
|
501
|
+
// 플레이백 리셋
|
|
502
|
+
if (this._playbackActive) {
|
|
503
|
+
this._onPlaybackStop();
|
|
504
|
+
}
|
|
350
505
|
this._scene = scene;
|
|
506
|
+
// M키 로딩 오버레이(scene 내장)에 fmsim Scene Monitor 렌더러 주입 — 카테고리별 표현.
|
|
507
|
+
if (scene === null || scene === void 0 ? void 0 : scene.loadingOverlay) {
|
|
508
|
+
scene.loadingOverlay.renderer = new SceneMonitorRenderer();
|
|
509
|
+
}
|
|
351
510
|
const backgroundColor = (_a = this._scene) === null || _a === void 0 ? void 0 : _a.root.state.fillStyle;
|
|
352
511
|
if (typeof backgroundColor === 'string') {
|
|
353
512
|
this.style.backgroundColor = backgroundColor;
|
|
@@ -370,7 +529,7 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
370
529
|
this.transientShowButtons();
|
|
371
530
|
}
|
|
372
531
|
async showScene(boardId, bindingData) {
|
|
373
|
-
if (!boardId)
|
|
532
|
+
if (!boardId || !this.provider)
|
|
374
533
|
return;
|
|
375
534
|
try {
|
|
376
535
|
var scene = await this.provider.get(boardId, true);
|
|
@@ -408,6 +567,206 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
408
567
|
this._scene.on('run-scenario', this.onRunScenario, this);
|
|
409
568
|
this._scene.on('legend-toggle', this.onLegendToggle, this);
|
|
410
569
|
this._scene.on('open-popup', this.onOpenPopup, this);
|
|
570
|
+
// VIEW 모드 SearchOverlay 디폴트 = 영구 추적 (things-scene 자동 처리).
|
|
571
|
+
// application 은 trackerOptions (color/fallback 등) 또는 onSearchSubmit/onSearchClose
|
|
572
|
+
// hook (디폴트 override) 만 제공.
|
|
573
|
+
//
|
|
574
|
+
// fallback: 원본 carrier 컴포넌트가 scene 에 없을 때 호출 (Tracker 1s polling).
|
|
575
|
+
// 플레이백 중이면 carrier-location history 에서 현재 시각의 머신/유닛을 lookup 해
|
|
576
|
+
// 해당 컴포넌트를 highlight 대상으로 반환. 플레이백 비활성 / 시간 정보 없음 /
|
|
577
|
+
// NA / 보드에 머신 없음 → null 반환해서 highlight 없이 추적만 유지.
|
|
578
|
+
this._scene.trackerOptions = {
|
|
579
|
+
color: BoardViewer_1.TRACKING_COLOR,
|
|
580
|
+
fallback: (_id, scene) => this._resolveCarrierFallback(scene)
|
|
581
|
+
};
|
|
582
|
+
// SearchOverlay submit/close hook — carrier-location store 의 충전/정리 트리거.
|
|
583
|
+
// 디폴트 동작 (tracker.start/stop) 은 그대로 위임 (return undefined).
|
|
584
|
+
this._scene.onSearchSubmit = (detail) => {
|
|
585
|
+
this._onCarrierTrackingSubmit(detail === null || detail === void 0 ? void 0 : detail.query);
|
|
586
|
+
};
|
|
587
|
+
this._scene.onSearchClose = () => {
|
|
588
|
+
this._carrierTrackingStore.clear();
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Tracker fallback resolver — 플레이백 시각의 carrier 위치를 컴포넌트로 변환.
|
|
593
|
+
* NA / 정보 없음 / 머신 미존재 → null (Tracker 가 highlight 없이 추적만 유지).
|
|
594
|
+
*
|
|
595
|
+
* 매 1초 polling 마다 호출되며, 결과 target 이 직전과 동일하면 로그 skip.
|
|
596
|
+
*/
|
|
597
|
+
_resolveCarrierFallback(scene) {
|
|
598
|
+
var _a, _b, _c, _d;
|
|
599
|
+
if (!this._playbackActive)
|
|
600
|
+
return null;
|
|
601
|
+
const currentTime = (_a = this._playbackEngine) === null || _a === void 0 ? void 0 : _a.currentTime;
|
|
602
|
+
if (!currentTime)
|
|
603
|
+
return null;
|
|
604
|
+
const timeMs = Date.parse(currentTime.replace(' ', 'T'));
|
|
605
|
+
if (!Number.isFinite(timeMs))
|
|
606
|
+
return null;
|
|
607
|
+
const carrier = (_d = (_c = (_b = this._scene) === null || _b === void 0 ? void 0 : _b.tracker) === null || _c === void 0 ? void 0 : _c.trackingId) !== null && _d !== void 0 ? _d : '?';
|
|
608
|
+
const loc = this._carrierTrackingStore.lookupAt(timeMs);
|
|
609
|
+
this._lastFallbackResolvedAt = Date.now();
|
|
610
|
+
const logIfChanged = (target, msg) => {
|
|
611
|
+
if (target === this._lastFallbackTarget)
|
|
612
|
+
return;
|
|
613
|
+
// 이전 target 의 bouncing arrow 해제 + 새 target 에 부착 (가시성 강화).
|
|
614
|
+
// deco-border 는 things-scene Tracker 가 처리하므로 우리는 deco-arrow 만 관리.
|
|
615
|
+
this._setFallbackArrow(this._lastFallbackTarget, null);
|
|
616
|
+
this._setFallbackArrow(null, target);
|
|
617
|
+
this._lastFallbackTarget = target;
|
|
618
|
+
console.log(msg);
|
|
619
|
+
};
|
|
620
|
+
if (!loc) {
|
|
621
|
+
logIfChanged(null, `[CarrierTracking] fallback: history miss (carrier=${carrier}, t=${currentTime})`);
|
|
622
|
+
return null;
|
|
623
|
+
}
|
|
624
|
+
if (loc.machineName === 'NA') {
|
|
625
|
+
logIfChanged(null, `[CarrierTracking] fallback: NA (carrier=${carrier}, t=${currentTime})`);
|
|
626
|
+
return null;
|
|
627
|
+
}
|
|
628
|
+
// unitName 우선 (더 정밀), 없으면 machineName 으로 폴백.
|
|
629
|
+
// 같은 id 컴포넌트가 여러 개일 수 있어 (예: 머신 본체 + 부착된 게이지) findAllById
|
|
630
|
+
// 로 후보 모두 가져온 뒤, mcs-mouse-event-handler 의 클릭 dispatch 와 동일한
|
|
631
|
+
// 패턴으로 머신 본체로 수렴:
|
|
632
|
+
// - 'isLVComponent' 후보 선택
|
|
633
|
+
// - parentObject 가 있으면 그쪽으로 escalate (게이지·바 → 머신 본체)
|
|
634
|
+
// - 없으면 자기 자신 사용
|
|
635
|
+
const resolveLVById = (id) => {
|
|
636
|
+
var _a, _b;
|
|
637
|
+
const candidates = (((_a = scene === null || scene === void 0 ? void 0 : scene.findAllById) === null || _a === void 0 ? void 0 : _a.call(scene, id)) || []);
|
|
638
|
+
const c = candidates.find(c => 'isLVComponent' in c);
|
|
639
|
+
if (!c)
|
|
640
|
+
return null;
|
|
641
|
+
return (_b = c.parentObject) !== null && _b !== void 0 ? _b : c;
|
|
642
|
+
};
|
|
643
|
+
let target = null;
|
|
644
|
+
let hitVia = null;
|
|
645
|
+
if (loc.unitName) {
|
|
646
|
+
const t = resolveLVById(loc.unitName);
|
|
647
|
+
if (t) {
|
|
648
|
+
target = t;
|
|
649
|
+
hitVia = 'unit';
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
if (!target && loc.machineName) {
|
|
653
|
+
const t = resolveLVById(loc.machineName);
|
|
654
|
+
if (t) {
|
|
655
|
+
target = t;
|
|
656
|
+
hitVia = 'machine';
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
if (hitVia === 'unit') {
|
|
660
|
+
logIfChanged(target, `[CarrierTracking] fallback applied via unit=${loc.unitName} ` +
|
|
661
|
+
`(machine=${loc.machineName} not tried) (carrier=${carrier}, t=${currentTime})`);
|
|
662
|
+
}
|
|
663
|
+
else if (hitVia === 'machine') {
|
|
664
|
+
logIfChanged(target, `[CarrierTracking] fallback applied via machine=${loc.machineName} ` +
|
|
665
|
+
`(unit=${loc.unitName} miss) (carrier=${carrier}, t=${currentTime})`);
|
|
666
|
+
}
|
|
667
|
+
else {
|
|
668
|
+
logIfChanged(target, `[CarrierTracking] fallback: scene 미존재 — unit=${loc.unitName} (miss), ` +
|
|
669
|
+
`machine=${loc.machineName} (miss) (carrier=${carrier}, t=${currentTime})`);
|
|
670
|
+
}
|
|
671
|
+
return target;
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* deco-arrow 라이프사이클 — 이전 target 끄고 새 target 에 bouncing arrow 부착.
|
|
675
|
+
* 둘 다 null 가능 (해제만, 부착만).
|
|
676
|
+
*/
|
|
677
|
+
_setFallbackArrow(off, on) {
|
|
678
|
+
var _a, _b, _c, _d;
|
|
679
|
+
if (off) {
|
|
680
|
+
try {
|
|
681
|
+
(_b = (_a = off).trigger) === null || _b === void 0 ? void 0 : _b.call(_a, 'deco-arrow-off');
|
|
682
|
+
}
|
|
683
|
+
catch (_e) { }
|
|
684
|
+
}
|
|
685
|
+
if (on) {
|
|
686
|
+
try {
|
|
687
|
+
;
|
|
688
|
+
(_d = (_c = on).trigger) === null || _d === void 0 ? void 0 : _d.call(_c, 'deco-arrow', {
|
|
689
|
+
animation: true,
|
|
690
|
+
repeat: true,
|
|
691
|
+
size: 0.75,
|
|
692
|
+
// TRACKING_COLOR(#00aaff7f) 의 색조는 유지하되 알파(7f) 만 제거해 불투명.
|
|
693
|
+
color: BoardViewer_1.TRACKING_COLOR.slice(0, 7),
|
|
694
|
+
duration: 5000
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
catch (_f) { }
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* 1초 polling — 화살표 부착 대상을 결정.
|
|
702
|
+
* 1) 플레이백 종료 / 추적 ID 없음 → 화살표 해제
|
|
703
|
+
* 2) carrier 가 scene 에 직접 존재 → **carrier 자체에 화살표 부착**
|
|
704
|
+
* (things-scene Tracker 가 carrier 발견 시 fallback 콜백 호출을 멈춰
|
|
705
|
+
* resolver 경로로는 우리가 모름. monitor 에서 직접 책임)
|
|
706
|
+
* 3) carrier 없음 + resolver 가 3초 이상 호출 안 됨 → 화살표 해제
|
|
707
|
+
* (그 외엔 resolver 의 logIfChanged 가 fallback target 으로 부착 중)
|
|
708
|
+
*/
|
|
709
|
+
_startFallbackArrowMonitor() {
|
|
710
|
+
if (this._fallbackArrowMonitor != null)
|
|
711
|
+
return;
|
|
712
|
+
this._fallbackArrowMonitor = window.setInterval(() => {
|
|
713
|
+
var _a, _b, _c, _d, _e;
|
|
714
|
+
// 1) 플레이백 종료 / 추적 ID 해제
|
|
715
|
+
const trackingId = (_b = (_a = this._scene) === null || _a === void 0 ? void 0 : _a.tracker) === null || _b === void 0 ? void 0 : _b.trackingId;
|
|
716
|
+
if (!this._playbackActive || !trackingId) {
|
|
717
|
+
this._clearFallbackArrow();
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
// 2) carrier 가 scene 에 직접 존재 — carrier(또는 parentObject)에 화살표 부착
|
|
721
|
+
const carrierComp = (((_d = (_c = this._scene) === null || _c === void 0 ? void 0 : _c.findAllById) === null || _d === void 0 ? void 0 : _d.call(_c, trackingId)) || [])
|
|
722
|
+
.find(c => 'isLVComponent' in c);
|
|
723
|
+
if (carrierComp) {
|
|
724
|
+
const arrowTarget = (_e = carrierComp.parentObject) !== null && _e !== void 0 ? _e : carrierComp;
|
|
725
|
+
if (arrowTarget !== this._lastFallbackTarget) {
|
|
726
|
+
this._setFallbackArrow(this._lastFallbackTarget, null);
|
|
727
|
+
this._setFallbackArrow(null, arrowTarget);
|
|
728
|
+
this._lastFallbackTarget = arrowTarget;
|
|
729
|
+
}
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
// 3) resolver 가 일정 시간 호출되지 않음 — Tracker 가 추적 중단했을 가능성
|
|
733
|
+
if (this._lastFallbackTarget && Date.now() - this._lastFallbackResolvedAt > 3000) {
|
|
734
|
+
this._clearFallbackArrow();
|
|
735
|
+
}
|
|
736
|
+
}, 1000);
|
|
737
|
+
}
|
|
738
|
+
_stopFallbackArrowMonitor() {
|
|
739
|
+
if (this._fallbackArrowMonitor != null) {
|
|
740
|
+
clearInterval(this._fallbackArrowMonitor);
|
|
741
|
+
this._fallbackArrowMonitor = undefined;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
/** 부착된 deco-arrow 강제 해제 + dedupe 상태 초기화. */
|
|
745
|
+
_clearFallbackArrow() {
|
|
746
|
+
if (this._lastFallbackTarget) {
|
|
747
|
+
this._setFallbackArrow(this._lastFallbackTarget, null);
|
|
748
|
+
this._lastFallbackTarget = null;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* onSearchSubmit hook — 영구추적 carrierName 이 설정되는 순간.
|
|
753
|
+
* 플레이백 윈도우가 잡혀 있으면 즉시 store 충전. 윈도우가 없으면
|
|
754
|
+
* 플레이백 시작 시 (_onPlaybackStart) 에 충전.
|
|
755
|
+
*/
|
|
756
|
+
_onCarrierTrackingSubmit(carrierName) {
|
|
757
|
+
this._clearFallbackArrow(); // 새 carrier — 기존 화살표/dedupe 정리
|
|
758
|
+
if (!carrierName) {
|
|
759
|
+
this._carrierTrackingStore.clear();
|
|
760
|
+
return;
|
|
761
|
+
}
|
|
762
|
+
const win = this._playbackWindow;
|
|
763
|
+
if (this._playbackActive && win) {
|
|
764
|
+
this._carrierTrackingStore.load(carrierName, win.from, win.to);
|
|
765
|
+
}
|
|
766
|
+
else {
|
|
767
|
+
// 플레이백 비활성 — 윈도우 정해질 때까지 대기. 캐시는 비워둠.
|
|
768
|
+
this._carrierTrackingStore.clear();
|
|
769
|
+
}
|
|
411
770
|
}
|
|
412
771
|
unbindSceneEvents(scene) {
|
|
413
772
|
scene.off('run', this.onRunBoard, this);
|
|
@@ -423,7 +782,7 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
423
782
|
transientShowButtons(stop) {
|
|
424
783
|
var buttons = [];
|
|
425
784
|
!this.hideNavigation && buttons.push(this._next, this._prev);
|
|
426
|
-
!this.hideFullscreen && buttons.push(this.
|
|
785
|
+
!this.hideFullscreen && buttons.push(this._fabGroup);
|
|
427
786
|
if (buttons.length == 0) {
|
|
428
787
|
return;
|
|
429
788
|
}
|
|
@@ -446,7 +805,7 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
446
805
|
}
|
|
447
806
|
this._forward.length <= 0 ? this._next.setAttribute('hidden', '') : this._next.removeAttribute('hidden');
|
|
448
807
|
this._backward.length <= 0 ? this._prev.setAttribute('hidden', '') : this._prev.removeAttribute('hidden');
|
|
449
|
-
this.
|
|
808
|
+
this._fabGroup && this._fabGroup.removeAttribute('hidden');
|
|
450
809
|
this._fade_animations.forEach(animation => {
|
|
451
810
|
animation.cancel();
|
|
452
811
|
if (stop)
|
|
@@ -484,6 +843,264 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
484
843
|
onTapFullscreen() {
|
|
485
844
|
togglefullscreen(this, () => this.requestUpdate(), () => this.requestUpdate());
|
|
486
845
|
}
|
|
846
|
+
onTapToggle3D() {
|
|
847
|
+
var _a, _b, _c;
|
|
848
|
+
const modelLayer = (_b = (_a = this._scene) === null || _a === void 0 ? void 0 : _a.root) === null || _b === void 0 ? void 0 : _b.rootModel;
|
|
849
|
+
if (!(modelLayer === null || modelLayer === void 0 ? void 0 : modelLayer.toggleThreeD))
|
|
850
|
+
return;
|
|
851
|
+
const entering3D = !modelLayer.is3dMode;
|
|
852
|
+
modelLayer.toggleThreeD();
|
|
853
|
+
this.requestUpdate();
|
|
854
|
+
// fmsim: 3D 진입 시 자동 회전
|
|
855
|
+
if (entering3D && ((_c = modelLayer._threeCapability) === null || _c === void 0 ? void 0 : _c.isInitialized)) {
|
|
856
|
+
modelLayer._threeCapability.controlsManager.reset();
|
|
857
|
+
modelLayer._threeCapability.controlsManager.setAutoRotate(true);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
onTapPlayback() {
|
|
861
|
+
var _a, _b;
|
|
862
|
+
if (this._playbackActive) {
|
|
863
|
+
this._onPlaybackStop();
|
|
864
|
+
}
|
|
865
|
+
else {
|
|
866
|
+
// 플레이백 시작 시 팝업 닫기
|
|
867
|
+
this.hidePopup();
|
|
868
|
+
// 1) 라이브 데이터 구독 실제 종료
|
|
869
|
+
(_a = this._dataSubscriptionProvider) === null || _a === void 0 ? void 0 : _a.pause();
|
|
870
|
+
this._unsubscribeSceneData();
|
|
871
|
+
// 2) 라이브 데이터 초기화 (깨끗한 상태에서 playback 시작)
|
|
872
|
+
this._resetSceneData();
|
|
873
|
+
this._playbackActive = true;
|
|
874
|
+
// playbackMode 를 "라이브 아님" 의미로 통일 — 준비 단계부터 set 해서
|
|
875
|
+
// FAB 클릭 직후 ~ Play 누르기 전 사이의 갭에서도 가드 (mouse handler,
|
|
876
|
+
// movement layer, restful subscription) 가 작동하도록.
|
|
877
|
+
if ((_b = this._scene) === null || _b === void 0 ? void 0 : _b.rootContainer)
|
|
878
|
+
this._scene.rootContainer.playbackMode = true;
|
|
879
|
+
if (!this._playbackEngine) {
|
|
880
|
+
this._playbackEngine = new PlaybackEngine();
|
|
881
|
+
this._playbackEngine.on('frame', ({ time }) => {
|
|
882
|
+
const controls = this.renderRoot.querySelector('ox-playback-controls');
|
|
883
|
+
if (controls)
|
|
884
|
+
controls.currentTime = time;
|
|
885
|
+
});
|
|
886
|
+
this._playbackEngine.on('state-change', (state) => {
|
|
887
|
+
if (state === 'stopped') {
|
|
888
|
+
const controls = this.renderRoot.querySelector('ox-playback-controls');
|
|
889
|
+
if (controls)
|
|
890
|
+
controls.playbackState = 'stopped';
|
|
891
|
+
}
|
|
892
|
+
this.requestUpdate();
|
|
893
|
+
});
|
|
894
|
+
this._playbackEngine.on('buffer-update', ({ bufferedRanges }) => {
|
|
895
|
+
const controls = this.renderRoot.querySelector('ox-playback-controls');
|
|
896
|
+
if (controls)
|
|
897
|
+
controls.bufferedRanges = bufferedRanges;
|
|
898
|
+
});
|
|
899
|
+
if (this._fetchPlaybackData) {
|
|
900
|
+
this._playbackEngine.setFetchFunction(this._fetchPlaybackData);
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
if (this._scene) {
|
|
904
|
+
this._playbackEngine.attachScene(this._scene);
|
|
905
|
+
}
|
|
906
|
+
this.dispatchEvent(new CustomEvent('playback-toggle', {
|
|
907
|
+
bubbles: true,
|
|
908
|
+
composed: true,
|
|
909
|
+
detail: { active: true }
|
|
910
|
+
}));
|
|
911
|
+
// playback 은 전체화면에서만 동작 — 이미 전체화면이면 그대로 유지
|
|
912
|
+
if (!document.fullscreenElement && !isIOS()) {
|
|
913
|
+
fullscreen(this, () => this.requestUpdate(), () => this.requestUpdate());
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
async _onPlaybackStart(e) {
|
|
918
|
+
var _a, _b, _c;
|
|
919
|
+
const { fromTime, toTime, speed } = e.detail;
|
|
920
|
+
if (!this._playbackEngine)
|
|
921
|
+
return;
|
|
922
|
+
// toTime is the user-selected window END (= controls' _appliedTo).
|
|
923
|
+
// The previous hardcoded `fromTime + 1h` ignored the controls'
|
|
924
|
+
// range selection, so 10m / 30m / Range modes silently played past
|
|
925
|
+
// the requested window. Falling back to `+1h` only if toTime was
|
|
926
|
+
// omitted (legacy callers).
|
|
927
|
+
const endTime = toTime instanceof Date ? toTime : new Date(fromTime.getTime() + 3600000);
|
|
928
|
+
// playbackMode 는 onTapPlayback (준비 단계) 에서 이미 set — idempotent
|
|
929
|
+
// 재설정으로 안전망 유지.
|
|
930
|
+
if ((_a = this._scene) === null || _a === void 0 ? void 0 : _a.rootContainer)
|
|
931
|
+
this._scene.rootContainer.playbackMode = true;
|
|
932
|
+
// 플레이백 윈도우 기록 + 영구추적 활성 시 carrier history 충전.
|
|
933
|
+
// 윈도우 변경 (재시작) 시에도 같은 경로 — store.load 가 key 비교로
|
|
934
|
+
// 동일 (carrierName, from, to) 이면 no-op.
|
|
935
|
+
this._playbackWindow = { from: fromTime, to: endTime };
|
|
936
|
+
const carrierName = (_c = (_b = this._scene) === null || _b === void 0 ? void 0 : _b.tracker) === null || _c === void 0 ? void 0 : _c.trackingId;
|
|
937
|
+
if (carrierName) {
|
|
938
|
+
this._carrierTrackingStore.load(carrierName, fromTime, endTime);
|
|
939
|
+
}
|
|
940
|
+
this._startFallbackArrowMonitor();
|
|
941
|
+
try {
|
|
942
|
+
await this._playbackEngine.startChunked(fromTime, endTime, speed);
|
|
943
|
+
}
|
|
944
|
+
catch (ex) {
|
|
945
|
+
console.error('[Playback] load failed:', ex);
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
_onPlaybackPause() {
|
|
949
|
+
var _a;
|
|
950
|
+
(_a = this._playbackEngine) === null || _a === void 0 ? void 0 : _a.pause();
|
|
951
|
+
}
|
|
952
|
+
_onPlaybackResume() {
|
|
953
|
+
var _a;
|
|
954
|
+
(_a = this._playbackEngine) === null || _a === void 0 ? void 0 : _a.resume();
|
|
955
|
+
}
|
|
956
|
+
async _onPlaybackStop() {
|
|
957
|
+
var _a, _b, _c;
|
|
958
|
+
const scene = this._scene; // 비동기 구간 scene 교체 감지용 캡처
|
|
959
|
+
// 1) 즉시: 엔진 정지 + 애니메이션 억제 ON (in-flight 애니메이션 즉시 종료)
|
|
960
|
+
(_a = this._playbackEngine) === null || _a === void 0 ? void 0 : _a.detachScene();
|
|
961
|
+
(_b = this._playbackEngine) === null || _b === void 0 ? void 0 : _b.stop();
|
|
962
|
+
this._playbackActive = false;
|
|
963
|
+
this._playbackWindow = undefined;
|
|
964
|
+
this._carrierTrackingStore.clear();
|
|
965
|
+
this._clearFallbackArrow();
|
|
966
|
+
this._stopFallbackArrowMonitor();
|
|
967
|
+
if (scene) {
|
|
968
|
+
scene.suppressAnimations = true;
|
|
969
|
+
if (scene.rootContainer)
|
|
970
|
+
scene.rootContainer.playbackMode = false;
|
|
971
|
+
}
|
|
972
|
+
// UI 신호 + fullscreen 해제
|
|
973
|
+
this.dispatchEvent(new CustomEvent('playback-toggle', {
|
|
974
|
+
bubbles: true,
|
|
975
|
+
composed: true,
|
|
976
|
+
detail: { active: false }
|
|
977
|
+
}));
|
|
978
|
+
if (document.fullscreenElement) {
|
|
979
|
+
exitfullscreen();
|
|
980
|
+
}
|
|
981
|
+
// 2) 1초 후: 보드 리셋 + live 구독 재개
|
|
982
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
983
|
+
if (this._playbackActive || this._scene !== scene)
|
|
984
|
+
return;
|
|
985
|
+
if (!scene)
|
|
986
|
+
return;
|
|
987
|
+
this._resetSceneData();
|
|
988
|
+
this._resubscribeSceneData();
|
|
989
|
+
(_c = this._dataSubscriptionProvider) === null || _c === void 0 ? void 0 : _c.resume();
|
|
990
|
+
// 3) 2초 후 (추가 1초): 억제 해제 — 첫 live batch 가 instant 배치된 뒤 정상 애니메이션 복원
|
|
991
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
992
|
+
if (this._scene === scene) {
|
|
993
|
+
scene.suppressAnimations = false;
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* 플레이백 시작 시: RESTful data-subscription 컴포넌트의 WebSocket 을 실제 disconnect.
|
|
998
|
+
* GraphQL 경로는 _dataSubscriptionProvider.pause() 에서 일괄 처리.
|
|
999
|
+
*/
|
|
1000
|
+
_unsubscribeSceneData() {
|
|
1001
|
+
var _a;
|
|
1002
|
+
const root = (_a = this._scene) === null || _a === void 0 ? void 0 : _a.root;
|
|
1003
|
+
if (!root || typeof root.traverse !== 'function')
|
|
1004
|
+
return;
|
|
1005
|
+
root.traverse((c) => {
|
|
1006
|
+
if (!c || c === root)
|
|
1007
|
+
return;
|
|
1008
|
+
// RESTful data-subscription 컴포넌트 — 자체 WebSocket disconnect
|
|
1009
|
+
if (c.subscription) {
|
|
1010
|
+
try {
|
|
1011
|
+
c.subscription.unsubscribe();
|
|
1012
|
+
}
|
|
1013
|
+
catch (_a) { }
|
|
1014
|
+
c.subscription = null;
|
|
1015
|
+
}
|
|
1016
|
+
if (c.client) {
|
|
1017
|
+
try {
|
|
1018
|
+
c.client.unsubscribeAll();
|
|
1019
|
+
c.client.close(true);
|
|
1020
|
+
}
|
|
1021
|
+
catch (_b) { }
|
|
1022
|
+
c.client = null;
|
|
1023
|
+
}
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
/**
|
|
1027
|
+
* 플레이백 종료 시: RESTful data-subscription 컴포넌트의 WebSocket 을 재연결.
|
|
1028
|
+
* GraphQL 경로는 _dataSubscriptionProvider.resume() 에서 일괄 처리.
|
|
1029
|
+
*/
|
|
1030
|
+
_resubscribeSceneData() {
|
|
1031
|
+
var _a;
|
|
1032
|
+
const root = (_a = this._scene) === null || _a === void 0 ? void 0 : _a.root;
|
|
1033
|
+
if (!root || typeof root.traverse !== 'function')
|
|
1034
|
+
return;
|
|
1035
|
+
root.traverse((c) => {
|
|
1036
|
+
if (!c || c === root)
|
|
1037
|
+
return;
|
|
1038
|
+
// RESTful data-subscription 컴포넌트 — WebSocket 재연결
|
|
1039
|
+
if (typeof c.requestData === 'function' && !c.client) {
|
|
1040
|
+
c.requestData();
|
|
1041
|
+
}
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
_resetSceneData() {
|
|
1045
|
+
var _a, _b, _c, _d;
|
|
1046
|
+
const root = (_a = this._scene) === null || _a === void 0 ? void 0 : _a.root;
|
|
1047
|
+
if (!root || typeof root.traverse !== 'function')
|
|
1048
|
+
return;
|
|
1049
|
+
root.traverse((c) => {
|
|
1050
|
+
if (!c || c === root)
|
|
1051
|
+
return;
|
|
1052
|
+
// null 대신 {} 로 리셋 — typeof null === 'object' 함정 회피 + destructuring 안전 +
|
|
1053
|
+
// statusColor 등 data?.X 형태 getter 가 자연스럽게 default 로 폴백
|
|
1054
|
+
try {
|
|
1055
|
+
if ('data' in c)
|
|
1056
|
+
c.data = {};
|
|
1057
|
+
}
|
|
1058
|
+
catch (_a) { }
|
|
1059
|
+
// 차량 등의 위치 캐시 초기화 — 없으면 이전 waypoint 경로로 스냅백되는 잔상 발생
|
|
1060
|
+
if ('lastWaypoint' in c)
|
|
1061
|
+
c.lastWaypoint = undefined;
|
|
1062
|
+
});
|
|
1063
|
+
// vehicle 의 waypoint 이동 애니메이션 전체 중단
|
|
1064
|
+
// (Animation.stepAnimation 의 suppress 체크만으로는 WaypointHandler 의 animatorMap 이
|
|
1065
|
+
// 완전히 비워지지 않을 수 있어 명시적 reset)
|
|
1066
|
+
if ((_b = root.waypointHandler) === null || _b === void 0 ? void 0 : _b.reset)
|
|
1067
|
+
root.waypointHandler.reset();
|
|
1068
|
+
// 모든 decorator 제거 — bouncing-arrow/border-highlighting 같은 SVG 애니메이션 decorator 는
|
|
1069
|
+
// decorator-registry 가 붙잡고 있어 data=null 만으로는 제거되지 않음. 명시적 reset 필요.
|
|
1070
|
+
try {
|
|
1071
|
+
root.trigger('deco-reset');
|
|
1072
|
+
}
|
|
1073
|
+
catch (_e) { }
|
|
1074
|
+
if ((_c = root.carrierManager) === null || _c === void 0 ? void 0 : _c.dispose)
|
|
1075
|
+
root.carrierManager.dispose();
|
|
1076
|
+
if ((_d = root.transitionEffect) === null || _d === void 0 ? void 0 : _d.dispose)
|
|
1077
|
+
root.transitionEffect.dispose();
|
|
1078
|
+
}
|
|
1079
|
+
_onPlaybackSeek(e) {
|
|
1080
|
+
var _a;
|
|
1081
|
+
(_a = this._playbackEngine) === null || _a === void 0 ? void 0 : _a.seekTo(e.detail.toTime);
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* 드래그 시작 신호 — 엔진의 재생 타이머 정지해서 스크러빙 동안
|
|
1085
|
+
* scene 이 엔진 시간으로 독립 갱신되지 않도록 함. _state 는 유지되므로
|
|
1086
|
+
* 드래그 종료 시 seekTo 가 원래 재생/일시정지 상태로 복원.
|
|
1087
|
+
*/
|
|
1088
|
+
_onPlaybackSeekStart() {
|
|
1089
|
+
var _a;
|
|
1090
|
+
(_a = this._playbackEngine) === null || _a === void 0 ? void 0 : _a.pauseForSeek();
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* 드래그 중 디바운스된 seek preview. 해당 시간의 snapshot 만 scene 에 적용.
|
|
1094
|
+
* 보드 리셋 없음, 애니메이션 억제.
|
|
1095
|
+
*/
|
|
1096
|
+
_onPlaybackSeekPreview(e) {
|
|
1097
|
+
var _a;
|
|
1098
|
+
(_a = this._playbackEngine) === null || _a === void 0 ? void 0 : _a.seekPreview(e.detail.toTime);
|
|
1099
|
+
}
|
|
1100
|
+
_onPlaybackSpeed(e) {
|
|
1101
|
+
var _a;
|
|
1102
|
+
(_a = this._playbackEngine) === null || _a === void 0 ? void 0 : _a.setSpeed(e.detail.speed);
|
|
1103
|
+
}
|
|
487
1104
|
onRunBoard() {
|
|
488
1105
|
this.dispatchEvent(new CustomEvent('run-board', { bubbles: true, composed: true, detail: this.board.id }));
|
|
489
1106
|
}
|
|
@@ -576,6 +1193,10 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
576
1193
|
this.popup = popup;
|
|
577
1194
|
}
|
|
578
1195
|
if (this.popup) {
|
|
1196
|
+
// playbackMode 를 component 보다 먼저 set — BoardComponentInfo 의 updated()
|
|
1197
|
+
// 가 component 변경을 보는 시점에 playbackMode 가 반드시 최신값이어야
|
|
1198
|
+
// detailInfo() 백엔드 호출 가드가 일관 동작.
|
|
1199
|
+
this.popup.playbackMode = this._playbackActive;
|
|
579
1200
|
this.popup.component = component;
|
|
580
1201
|
}
|
|
581
1202
|
}
|
|
@@ -642,10 +1263,85 @@ BoardViewer.styles = [
|
|
|
642
1263
|
right: 5px;
|
|
643
1264
|
}
|
|
644
1265
|
|
|
645
|
-
|
|
1266
|
+
[fab-group] {
|
|
646
1267
|
position: absolute;
|
|
647
1268
|
bottom: 15px;
|
|
648
1269
|
right: 16px;
|
|
1270
|
+
display: flex;
|
|
1271
|
+
flex-direction: column-reverse;
|
|
1272
|
+
align-items: center;
|
|
1273
|
+
gap: 12px;
|
|
1274
|
+
z-index: 1000;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
[fab-group] md-fab {
|
|
1278
|
+
transition: transform 0.2s ease, opacity 0.2s ease;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
[fab-group] md-fab.main-fab md-icon {
|
|
1282
|
+
transition: transform 0.3s ease;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
[fab-group] md-fab.main-fab[expanded] md-icon {
|
|
1286
|
+
transform: rotate(45deg);
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
[fab-group] md-fab.sub-fab {
|
|
1290
|
+
--md-fab-container-width: 48px;
|
|
1291
|
+
--md-fab-container-height: 48px;
|
|
1292
|
+
/* fab 표면 색 = image 의 자체 원형 배경 (#F9EBEA) 과 일치.
|
|
1293
|
+
* 이렇게 하면 md-fab 의 내부 padding 영역도 같은 색이라
|
|
1294
|
+
* 시각적으로 사라짐 — 세 버튼 모두 visible 48px 컨테이너 통일. */
|
|
1295
|
+
--md-fab-container-color: #F9EBEA;
|
|
1296
|
+
--md-fab-icon-color: #F87171;
|
|
1297
|
+
--md-icon-size: 36px;
|
|
1298
|
+
transform: scale(0);
|
|
1299
|
+
opacity: 0;
|
|
1300
|
+
pointer-events: none;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
/* visible 영역은 컨테이너(48px) 그대로 — fullscreen 버튼과 동일.
|
|
1304
|
+
* img 자체는 48px 박스이고 transform scale 로 내부 그래픽만 확대.
|
|
1305
|
+
* wrap 의 overflow:hidden + border-radius:50% 가 fab 원형 밖으로
|
|
1306
|
+
* 넘치는 영역을 잘라내어 외형 크기는 변하지 않음. */
|
|
1307
|
+
[fab-group] md-fab.sub-fab .fab-icon-wrap {
|
|
1308
|
+
width: 48px;
|
|
1309
|
+
height: 48px;
|
|
1310
|
+
display: block;
|
|
1311
|
+
overflow: hidden;
|
|
1312
|
+
border-radius: 50%;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
[fab-group] md-fab.sub-fab .fab-icon-wrap img.fab-icon {
|
|
1316
|
+
width: 48px;
|
|
1317
|
+
height: 48px;
|
|
1318
|
+
display: block;
|
|
1319
|
+
transform: scale(1.15);
|
|
1320
|
+
transform-origin: center;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
/* legacy inline svg 경로 — 동일하게 box 48 유지 + scale 로 그래픽만 확대. */
|
|
1324
|
+
[fab-group] md-fab.sub-fab svg[slot="icon"] {
|
|
1325
|
+
width: 48px;
|
|
1326
|
+
height: 48px;
|
|
1327
|
+
display: block;
|
|
1328
|
+
transform: scale(1.15);
|
|
1329
|
+
transform-origin: center;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
[fab-group][expanded] md-fab.sub-fab {
|
|
1333
|
+
transform: scale(1);
|
|
1334
|
+
opacity: 1;
|
|
1335
|
+
pointer-events: auto;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
[fab-group] md-fab.sub-fab[disabled] {
|
|
1339
|
+
opacity: 0.4;
|
|
1340
|
+
pointer-events: none;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
ox-playback-controls {
|
|
1344
|
+
transition: opacity 0.3s ease;
|
|
649
1345
|
}
|
|
650
1346
|
|
|
651
1347
|
[hidden] {
|
|
@@ -677,6 +1373,9 @@ BoardViewer.styles = [
|
|
|
677
1373
|
}
|
|
678
1374
|
`
|
|
679
1375
|
];
|
|
1376
|
+
/** SearchOverlay 의 query-submit 시 사용할 추적 색깔. things-scene 의 Scene.tracker
|
|
1377
|
+
* 가 폴링/데코/3D outline 색 동기화 일괄 관리. */
|
|
1378
|
+
BoardViewer.TRACKING_COLOR = '#00aaff7f';
|
|
680
1379
|
__decorate([
|
|
681
1380
|
property({ type: String })
|
|
682
1381
|
], BoardViewer.prototype, "baseUrl", void 0);
|
|
@@ -692,6 +1391,9 @@ __decorate([
|
|
|
692
1391
|
__decorate([
|
|
693
1392
|
property({ type: Object })
|
|
694
1393
|
], BoardViewer.prototype, "values", void 0);
|
|
1394
|
+
__decorate([
|
|
1395
|
+
property({ type: Object })
|
|
1396
|
+
], BoardViewer.prototype, "loadTracker", void 0);
|
|
695
1397
|
__decorate([
|
|
696
1398
|
property({ type: Boolean, reflect: true, attribute: 'hide-fullscreen' })
|
|
697
1399
|
], BoardViewer.prototype, "hideFullscreen", void 0);
|
|
@@ -700,19 +1402,10 @@ __decorate([
|
|
|
700
1402
|
], BoardViewer.prototype, "hideNavigation", void 0);
|
|
701
1403
|
__decorate([
|
|
702
1404
|
state()
|
|
703
|
-
], BoardViewer.prototype, "
|
|
704
|
-
__decorate([
|
|
705
|
-
state()
|
|
706
|
-
], BoardViewer.prototype, "_forward", void 0);
|
|
1405
|
+
], BoardViewer.prototype, "_fabExpanded", void 0);
|
|
707
1406
|
__decorate([
|
|
708
1407
|
state()
|
|
709
|
-
], BoardViewer.prototype, "
|
|
710
|
-
__decorate([
|
|
711
|
-
state()
|
|
712
|
-
], BoardViewer.prototype, "_oldtarget", void 0);
|
|
713
|
-
__decorate([
|
|
714
|
-
state()
|
|
715
|
-
], BoardViewer.prototype, "_fade_animations", void 0);
|
|
1408
|
+
], BoardViewer.prototype, "_playbackActive", void 0);
|
|
716
1409
|
__decorate([
|
|
717
1410
|
query('#target')
|
|
718
1411
|
], BoardViewer.prototype, "_target", void 0);
|
|
@@ -723,9 +1416,12 @@ __decorate([
|
|
|
723
1416
|
query('#next')
|
|
724
1417
|
], BoardViewer.prototype, "_next", void 0);
|
|
725
1418
|
__decorate([
|
|
726
|
-
query('
|
|
727
|
-
], BoardViewer.prototype, "
|
|
728
|
-
|
|
1419
|
+
query('[fab-group]')
|
|
1420
|
+
], BoardViewer.prototype, "_fabGroup", void 0);
|
|
1421
|
+
__decorate([
|
|
1422
|
+
property({ attribute: false })
|
|
1423
|
+
], BoardViewer.prototype, "_fetchPlaybackData", void 0);
|
|
1424
|
+
BoardViewer = BoardViewer_1 = __decorate([
|
|
729
1425
|
customElement('ox-board-viewer')
|
|
730
1426
|
], BoardViewer);
|
|
731
1427
|
export { BoardViewer };
|