@magic-xpa/gui 4.1100.0-dev4110.192 → 4.1100.0-dev4110.194

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.
@@ -89,6 +89,7 @@ class Events {
89
89
  static OnIsSpecialIgnoreButtonFormatEvent = null;
90
90
  static GetMainProgramEvent = null;
91
91
  static TranslateLogicalNameEvent = null;
92
+ static GetAssetsURLEvent = null;
92
93
  static GetMessageStringEvent = null;
93
94
  static OnFocus(ctrl, line, isProduceClick, onMultiMark) {
94
95
  Debug.Assert(Events.FocusEvent !== null);
@@ -338,6 +339,10 @@ class Events {
338
339
  Debug.Assert(Events.TranslateLogicalNameEvent !== null);
339
340
  return Events.TranslateLogicalNameEvent(fromString);
340
341
  }
342
+ static GetAssetsURL() {
343
+ Debug.Assert(Events.GetAssetsURLEvent !== null);
344
+ return Events.GetAssetsURLEvent();
345
+ }
341
346
  static GetMessageString(msgId) {
342
347
  Debug.Assert(Events.GetMessageStringEvent !== null);
343
348
  let fromString = Events.GetMessageStringEvent(msgId);
@@ -11894,7 +11899,7 @@ class MgControlBase extends GuiControlPropertyAdapter {
11894
11899
  }
11895
11900
  fileName = Events.TranslateLogicalName(fileName);
11896
11901
  if (!Misc.IsWebUrl(fileName))
11897
- fileName = "./assets/images/" + fileName;
11902
+ fileName = Events.GetAssetsURL() + "/images/" + fileName;
11898
11903
  if (this.IsImageButton()) {
11899
11904
  Commands.addOperationWithLine(CommandType.SET_STYLE, this, 0, MagicProperties.ImageFile, fileName);
11900
11905
  }
@@ -13406,7 +13411,7 @@ class MgControlBase extends GuiControlPropertyAdapter {
13406
13411
  if (connectedButton.IsImageButton() && connectedButton.PropertyExists(PropInterface.PROP_TYPE_IMAGE_FILENAME)) {
13407
13412
  imageFileName = await (await connectedButton.getProp(PropInterface.PROP_TYPE_IMAGE_FILENAME)).getValue();
13408
13413
  if (!Misc.IsWebUrl(imageFileName))
13409
- imageFileName = "./assets/images/" + imageFileName;
13414
+ imageFileName = Events.GetAssetsURL() + "/images/" + imageFileName;
13410
13415
  Commands.addOperationWithLine(CommandType.SET_STYLE, this, 0, MagicProperties.ImageFile, imageFileName);
13411
13416
  }
13412
13417
  this.ConnectedControl = connectedButton;