@livinglogic/livingapi 0.16.0 → 1.0.0

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@livinglogic/livingapi",
3
- "version": "0.16.0",
3
+ "version": "1.0.0",
4
4
  "description": "Javascript version of the LivingAPI classes of LivingApps",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "module": "dist/esm-node/livingapi.js",
19
19
  "browser": "dist/umd/livingapi.js",
20
20
  "dependencies": {
21
- "@livinglogic/ul4": "~1.13.1"
21
+ "@livinglogic/ul4": "~1.15.1"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@babel/core": "^7.14.6",
package/src/livingapi.js CHANGED
@@ -5073,9 +5073,41 @@ export class ImageLayoutControl extends LayoutControl
5073
5073
  {
5074
5074
  return imagelayoutcontroltype;
5075
5075
  }
5076
+
5077
+ get original()
5078
+ {
5079
+ return this._original;
5080
+ }
5081
+
5082
+ set original(original)
5083
+ {
5084
+ this._original = original;
5085
+ if (this.globals._in_form())
5086
+ this._set_dom_value(this._original);
5087
+ }
5088
+
5089
+ _set_dom_value(value)
5090
+ {
5091
+ let img = this._dom_root.querySelector("img");
5092
+ if (img !== null)
5093
+ {
5094
+ let url = (value === null) ?
5095
+ "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" :
5096
+ this.globals.scaled_url(value, this.width, this.height);
5097
+ img.setAttribute("src", url);
5098
+ }
5099
+ }
5100
+
5101
+ [ul4.symbols.setattr](name, value)
5102
+ {
5103
+ if (name === "original")
5104
+ this.original = value;
5105
+ else
5106
+ super[ul4.symbols.setattr](name, value);
5107
+ }
5076
5108
  };
5077
5109
 
5078
- ImageLayoutControl.prototype._ul4onattrs = [...LayoutControl.prototype._ul4onattrs, "original", "scaled", "_visible"];
5110
+ ImageLayoutControl.prototype._ul4onattrs = [...LayoutControl.prototype._ul4onattrs, "_original", "scaled", "_visible"];
5079
5111
  ImageLayoutControl.prototype._ul4attrs = new Set([...LayoutControl.prototype._ul4attrs, "original", "scaled"]);
5080
5112
 
5081
5113