senangwebs-tour 1.0.9 → 1.0.11
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/dist/swt-editor.js +13 -2
- package/dist/swt-editor.js.map +1 -1
- package/dist/swt-editor.min.js +1 -1
- package/dist/swt.js +3 -3
- package/dist/swt.js.map +1 -1
- package/dist/swt.min.js +1 -1
- package/package.json +1 -1
- package/src/editor/editor-entry.js +2 -0
- package/src/editor/js/editor.js +4 -0
- package/src/editor/js/event-emitter.js +7 -1
- package/src/index.js +3 -3
package/dist/swt-editor.js
CHANGED
|
@@ -4669,9 +4669,11 @@
|
|
|
4669
4669
|
PROJECT_IMPORT: 'project:import',
|
|
4670
4670
|
PROJECT_EXPORT: 'project:export',
|
|
4671
4671
|
|
|
4672
|
-
// Config events
|
|
4672
|
+
// Config/Tour events
|
|
4673
4673
|
CONFIG_UPDATE: 'config:update',
|
|
4674
4674
|
INITIAL_SCENE_CHANGE: 'config:initialSceneChange',
|
|
4675
|
+
TOUR_TITLE_CHANGE: 'tour:titleChange',
|
|
4676
|
+
TOUR_DESCRIPTION_CHANGE: 'tour:descriptionChange',
|
|
4675
4677
|
|
|
4676
4678
|
// Preview events
|
|
4677
4679
|
PREVIEW_START: 'preview:start',
|
|
@@ -4833,6 +4835,7 @@
|
|
|
4833
4835
|
const dataEvents = [
|
|
4834
4836
|
EditorEvents.SCENE_ADD,
|
|
4835
4837
|
EditorEvents.SCENE_REMOVE,
|
|
4838
|
+
EditorEvents.SCENE_SELECT,
|
|
4836
4839
|
EditorEvents.SCENE_UPDATE,
|
|
4837
4840
|
EditorEvents.SCENE_REORDER,
|
|
4838
4841
|
EditorEvents.SCENE_CLEAR,
|
|
@@ -4841,11 +4844,14 @@
|
|
|
4841
4844
|
EditorEvents.SCENE_STARTING_POSITION_CLEAR,
|
|
4842
4845
|
EditorEvents.HOTSPOT_ADD,
|
|
4843
4846
|
EditorEvents.HOTSPOT_REMOVE,
|
|
4847
|
+
EditorEvents.HOTSPOT_SELECT,
|
|
4844
4848
|
EditorEvents.HOTSPOT_UPDATE,
|
|
4845
4849
|
EditorEvents.HOTSPOT_DUPLICATE,
|
|
4846
4850
|
EditorEvents.HOTSPOT_POSITION_CHANGE,
|
|
4847
4851
|
EditorEvents.CONFIG_UPDATE,
|
|
4848
4852
|
EditorEvents.INITIAL_SCENE_CHANGE,
|
|
4853
|
+
EditorEvents.TOUR_TITLE_CHANGE,
|
|
4854
|
+
EditorEvents.TOUR_DESCRIPTION_CHANGE,
|
|
4849
4855
|
EditorEvents.PROJECT_LOAD,
|
|
4850
4856
|
EditorEvents.PROJECT_IMPORT,
|
|
4851
4857
|
EditorEvents.PROJECT_NEW,
|
|
@@ -5362,6 +5368,7 @@
|
|
|
5362
5368
|
document.getElementById('tourTitle')?.addEventListener('input', debounce((e) => {
|
|
5363
5369
|
this.config.title = e.target.value;
|
|
5364
5370
|
this.markUnsavedChanges();
|
|
5371
|
+
this.emit(EditorEvents.TOUR_TITLE_CHANGE, { title: e.target.value });
|
|
5365
5372
|
const projectName = document.getElementById('project-name');
|
|
5366
5373
|
if (projectName && projectName.value !== e.target.value) {
|
|
5367
5374
|
projectName.value = e.target.value;
|
|
@@ -5371,6 +5378,7 @@
|
|
|
5371
5378
|
document.getElementById('project-name')?.addEventListener('input', debounce((e) => {
|
|
5372
5379
|
this.config.title = e.target.value;
|
|
5373
5380
|
this.markUnsavedChanges();
|
|
5381
|
+
this.emit(EditorEvents.TOUR_TITLE_CHANGE, { title: e.target.value });
|
|
5374
5382
|
const tourTitle = document.getElementById('tourTitle');
|
|
5375
5383
|
if (tourTitle && tourTitle.value !== e.target.value) {
|
|
5376
5384
|
tourTitle.value = e.target.value;
|
|
@@ -5380,11 +5388,13 @@
|
|
|
5380
5388
|
document.getElementById('tourDescription')?.addEventListener('input', debounce((e) => {
|
|
5381
5389
|
this.config.description = e.target.value;
|
|
5382
5390
|
this.markUnsavedChanges();
|
|
5391
|
+
this.emit(EditorEvents.TOUR_DESCRIPTION_CHANGE, { description: e.target.value });
|
|
5383
5392
|
}, 300));
|
|
5384
5393
|
|
|
5385
5394
|
document.getElementById('tourInitialScene')?.addEventListener('change', (e) => {
|
|
5386
5395
|
this.config.initialSceneId = e.target.value;
|
|
5387
5396
|
this.markUnsavedChanges();
|
|
5397
|
+
this.emit(EditorEvents.INITIAL_SCENE_CHANGE, { initialSceneId: e.target.value });
|
|
5388
5398
|
});
|
|
5389
5399
|
|
|
5390
5400
|
document.getElementById('exportJsonBtn')?.addEventListener('click', () => {
|
|
@@ -6086,7 +6096,8 @@
|
|
|
6086
6096
|
window.PreviewController = PreviewController$1;
|
|
6087
6097
|
window.UIController = UIController$1;
|
|
6088
6098
|
window.ExportManager = ExportManager$1;
|
|
6089
|
-
window.TourEditor = TourEditor$1;
|
|
6099
|
+
window.TourEditor = TourEditor$1;
|
|
6100
|
+
window.EditorEvents = EventEmitter;
|
|
6090
6101
|
|
|
6091
6102
|
return TourEditor$1;
|
|
6092
6103
|
|