sunrize 1.0.48 → 1.0.49

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,7 +1,7 @@
1
1
  {
2
2
  "name": "sunrize",
3
3
  "productName": "Sunrize X3D Editor",
4
- "version": "1.0.48",
4
+ "version": "1.0.49",
5
5
  "description": "A Multi Platform X3D Editor",
6
6
  "homepage": "https://create3000.github.io/sunrize/",
7
7
  "author": "Holger Seelig",
@@ -59,7 +59,7 @@
59
59
  "qtip2": "^3.0.3",
60
60
  "spectrum-colorpicker2": "^2.0.10",
61
61
  "string-similarity": "^4.0.4",
62
- "x_ite": "^8.8.7"
62
+ "x_ite": "^8.9.0"
63
63
  },
64
64
  "main": "src/main.js",
65
65
  "bin": {
@@ -213,34 +213,19 @@ module .exports = class Application
213
213
 
214
214
  },
215
215
  { type: "separator" },
216
- {
217
- label: exportPath ? util .format (_ ("Export As %s"), path .basename (exportPath)) : _ ("Export..."),
218
- accelerator: "CmdOrCtrl+E",
219
- click: async () =>
216
+ ... exportPath ?
217
+ [
220
218
  {
221
- const exportPath = this .exportPath .get (this .currentFile)
222
-
223
- if (exportPath)
224
- {
225
- this .mainWindow .webContents .send ("export-as", exportPath)
226
- }
227
- else
219
+ label: util .format (_ ("Export As %s"), path .basename (exportPath)),
220
+ accelerator: "CmdOrCtrl+E",
221
+ click: async () =>
228
222
  {
229
- const response = await this .showExportDialog (this .currentFile)
230
-
231
- if (response .canceled)
232
- return
233
-
234
- electron .app .addRecentDocument (response .filePath)
223
+ const exportPath = this .exportPath .get (this .currentFile)
235
224
 
236
- this .exportPath .set (this .currentFile, response .filePath)
237
-
238
- this .mainWindow .webContents .send ("export-as", response .filePath)
239
-
240
- this .changeMenu ()
241
- }
242
- },
243
- },
225
+ this .mainWindow .webContents .send ("export-as", exportPath)
226
+ },
227
+ }
228
+ ] : [ ],
244
229
  {
245
230
  label: _ ("Export As..."),
246
231
  accelerator: "Shift+CmdOrCtrl+E",
@@ -646,7 +631,7 @@ module .exports = class Application
646
631
  defaultPath: defaultPath,
647
632
  properties: ["openFile", "multiSelections"],
648
633
  filters : [
649
- {name: "X3D Document", extensions: ["x3d", "x3dz", "x3dj", "x3djz", "x3dv", "x3dvz", "wrl", "wrz", "wrl.gz", "vrml", "gltf", "glb", "obj", "stl", "svg"]},
634
+ {name: "X3D Document", extensions: ["x3d", "x3dz", "x3dj", "x3djz", "x3dv", "x3dvz", "wrl", "wrz", "wrl.gz", "vrml", "gltf", "glb", "obj", "stl", "ply", "svg"]},
650
635
  ],
651
636
  })
652
637
  }
@@ -194,7 +194,7 @@ module .exports = new class Document extends Interface
194
194
 
195
195
  if (this .filePath)
196
196
  {
197
- if (path .extname (this .filePath) .match (/.(?:gltf|glb|obj|stl|svg)/i))
197
+ if (path .extname (this .filePath) .match (/.(?:gltf|glb|obj|stl|ply|svg)/i))
198
198
  return
199
199
 
200
200
  fs .writeFileSync (this .filePath, Editor .getContents (scene, path .extname (this .filePath)))
@@ -23,14 +23,10 @@ module .exports = class Splitter extends Interface
23
23
  top .resizable ({
24
24
  minHeight: 0,
25
25
  handles: "s",
26
- resize: () =>
27
- {
28
- this .position = top .outerHeight () / this .splitter .innerHeight ()
29
- },
26
+ resize: () => this .position = this .position,
30
27
  })
31
28
 
32
29
  top .find ("> .ui-resizable-s") .append ($("<div></div>"))
33
-
34
30
  break
35
31
  }
36
32
  case "vertical":
@@ -40,14 +36,10 @@ module .exports = class Splitter extends Interface
40
36
  left .resizable ({
41
37
  minWidth: 0,
42
38
  handles: "e",
43
- resize: () =>
44
- {
45
- this .position = left .outerWidth () / this .splitter .innerWidth ()
46
- },
39
+ resize: () => this .position = this .position,
47
40
  })
48
41
 
49
42
  left .find ("> .ui-resizable-e") .append ($("<div></div>"))
50
-
51
43
  break
52
44
  }
53
45
  }
@@ -58,34 +50,28 @@ module .exports = class Splitter extends Interface
58
50
  configure ()
59
51
  {
60
52
  if (this .config .file .position !== undefined)
61
- {
62
53
  this .position = this .config .file .position
63
- }
64
54
  else
65
- {
66
- switch (this .orientation)
67
- {
68
- case "horizontal":
69
- {
70
- const top = this .splitter .find ("> .horizontal-splitter-top")
71
-
72
- this .position = top .outerHeight () / this .splitter .innerHeight ()
73
- break
74
- }
75
- case "vertical":
76
- {
77
- const left = this .splitter .find ("> .vertical-splitter-left")
78
-
79
- this .position = left .outerWidth () / this .splitter .innerWidth ()
80
- break
81
- }
82
- }
83
- }
55
+ this .splitter .trigger ("position")
84
56
  }
85
57
 
86
58
  get position ()
87
59
  {
88
- return this .config .file .position
60
+ switch (this .orientation)
61
+ {
62
+ case "horizontal":
63
+ {
64
+ const top = this .splitter .find ("> .horizontal-splitter-top")
65
+
66
+ return this .position = top .outerHeight () / this .splitter .innerHeight ()
67
+ }
68
+ case "vertical":
69
+ {
70
+ const left = this .splitter .find ("> .vertical-splitter-left")
71
+
72
+ return left .outerWidth () / this .splitter .innerWidth ()
73
+ }
74
+ }
89
75
  }
90
76
 
91
77
  /**
@@ -2108,20 +2108,16 @@ module .exports = class OutlineView extends Interface
2108
2108
  .addClass ("connector-description")
2109
2109
  .appendTo (name)
2110
2110
 
2111
- const
2112
- sourceNodeName = route .getSourceNode () .getName () .length ? route .getSourceNode () .getName () : _ ("<unnamed>"),
2113
- destinationNodeName = route .getDestinationNode () .getName () .length ? route .getDestinationNode () .getName () : _ ("<unnamed>")
2114
-
2115
2111
  switch (type)
2116
2112
  {
2117
2113
  case "input":
2118
2114
  {
2119
- connectorDescription .text (util .format (_ ("Route from %s.%s"), sourceNodeName, route .sourceField))
2115
+ connectorDescription .text (util .format (_ ("Route from %s<%s>.%s"), route .getSourceNode () .getTypeName (), route .getSourceNode () .getName () || _ ("unnamed"), route .sourceField))
2120
2116
  break
2121
2117
  }
2122
2118
  case "output":
2123
2119
  {
2124
- connectorDescription .text (util .format (_ ("Route to %s.%s"), destinationNodeName, route .destinationField))
2120
+ connectorDescription .text (util .format (_ ("Route to %s<%s>.%s"), route .getDestinationNode () .getTypeName (), route .getDestinationNode () .getName () || _ ("unnamed"), route .destinationField))
2125
2121
  break
2126
2122
  }
2127
2123
  }