Hi,
We're upgrading our application to SmartGWT 14.1d-20250226 and we've noticed a change in behaviour for Button Icon URL, the image folder seems to appended an extra time.
Tracking down the changes in the code, we've noticed this change in ISC_Foundation.js:
13.0:
14.1:
Namely passing this.skinImgDir instead of null to setImage.
This can be reproduced by setting the icon of a ToolStripButton after the button is drawn:
Is this change intentional ?
Thanks for your response.
We're upgrading our application to SmartGWT 14.1d-20250226 and we've noticed a change in behaviour for Button Icon URL, the image folder seems to appended an extra time.
Tracking down the changes in the code, we've noticed this change in ISC_Foundation.js:
13.0:
Code:
isc.A.setIcon = function isc_Button_setIcon(_1) { var _2 = this.icon != null; this.icon = _1; if (this.isDrawn()) { var _3 = this.$5f() , _4 = this.$1889(); if (_2 && (_1 != null) && this.$195i(this.$116h, _3, _4)) { this.setImage(this.$116h, _3, null, _4) } else { this.redraw() } } }
Code:
isc.A.setIcon = function isc_Button_setIcon(_1) { var _2 = this.icon != null; this.icon = _1; if (this.isDrawn()) { var _3 = this.$5f() , _4 = this.$1889(); if (_2 && (_1 != null) && this.$195i(this.$116h, _3, _4)) { this.setImage(this.$116h, _3, this.skinImgDir, _4) } else { this.redraw() } } }
This can be reproduced by setting the icon of a ToolStripButton after the button is drawn:
Code:
ToolStripButton print = new ToolStripButton("Print"); ToolStripButton highlight = new ToolStripButton("Highlight"); highlight.addClickHandler(event -> print.setIcon("logo.jpg"));
Thanks for your response.
Comment