Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LS-39764 - [#LS-39764] Resolve qooxdoo 7.5 compile and runtime warnings #13

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions source/class/qx/html/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ qx.Class.define("qx.html.Image", {
);

this.registerProperty("scale", null, this._setScaleProperty);
this.registerProperty("repeat", null, this._setRepeatProperty); //LS-39764 - Resolve qooxdoo 7.5 compile and runtime warnings
},

/*
Expand Down Expand Up @@ -109,7 +110,7 @@ qx.Class.define("qx.html.Image", {

var source = this._getProperty("source");
var scale = this._getProperty("scale");
var repeat = scale ? "scale" : this._getProperty("repeat") || "no-repeat"; //LWEB-183-enable-image-to-be-set-through-theme
var repeat = scale ? "scale" : this.getRepeat() || "no-repeat"; //LWEB-183-enable-image-to-be-set-through-theme //LS-39764 - Resolve qooxdoo 7.5 compile and runtime warnings

// Source can be null in certain circumstances.
// See bug #3701 for details.
Expand Down Expand Up @@ -149,7 +150,7 @@ qx.Class.define("qx.html.Image", {
// overridden
_createDomElement() {
var scale = this._getProperty("scale");
var repeat = scale ? "scale" : this._getProperty("repeat") || "no-repeat"; //LWEB-183-enable-image-to-be-set-through-theme
var repeat = scale ? "scale" : this.getRepeat() || "no-repeat"; //LWEB-183-enable-image-to-be-set-through-theme //LS-39764 - Resolve qooxdoo 7.5 compile and runtime warnings

if (qx.core.Environment.get("engine.name") == "mshtml") {
var source = this._getProperty("source");
Expand Down Expand Up @@ -220,7 +221,7 @@ qx.Class.define("qx.html.Image", {
* Whether the image should be scaled or not.
*
* @param value {Boolean} Scale the image
* @return {qx.html.Label} This instance for for chaining support.
* @return {qx.html.Label} This instance for chaining support.
*/
setScale(value) {
this._setProperty("scale", value);
Expand All @@ -234,6 +235,19 @@ qx.Class.define("qx.html.Image", {
*/
getScale() {
return this._getProperty("scale");
},

setRepeat(value) { //LS-39764 - Resolve qooxdoo 7.5 compile and runtime warnings
this._setProperty("repeat", value);
return this;
},

getRepeat() { //LS-39764 - Resolve qooxdoo 7.5 compile and runtime warnings
return this._getProperty("repeat");
},

_setRepeatProperty(value) { //LS-39764 - Resolve qooxdoo 7.5 compile and runtime warnings
// Nothing
}
}
});
4 changes: 2 additions & 2 deletions source/class/qx/ui/basic/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ qx.Class.define("qx.ui.basic.Image", {
_applyScale(value) {
//LWEB-183-enable-image-to-be-set-through-theme
if(this.getSource()) {
this._styleSource();
this._styleSource();
}
},

Expand Down Expand Up @@ -548,7 +548,7 @@ qx.Class.define("qx.ui.basic.Image", {
this.__loadUnmanagedImage(contentEl, source);
}
if(!this.getScale()) { //LWEB-183-enable-image-to-be-set-through-theme
contentEl._setProperty("repeat", this.getRepeat());
contentEl.setRepeat(this.getRepeat()); //LS-39764 - Resolve qooxdoo 7.5 compile and runtime warnings
}
},

Expand Down
Loading