1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-13 22:07:15 +00:00

Allow percentage width and height on image widget

This commit is contained in:
Jermolene
2014-10-19 13:21:20 +01:00
parent 299bef2a77
commit 12e26009ee
2 changed files with 5 additions and 3 deletions

View File

@@ -97,10 +97,10 @@ ImageWidget.prototype.render = function(parent,nextSibling) {
domNode.setAttribute("class",this.imageClass);
}
if(this.imageWidth) {
domNode.setAttribute("width",parseInt(this.imageWidth,10) + "px");
domNode.setAttribute("width",this.imageWidth);
}
if(this.imageHeight) {
domNode.setAttribute("height",parseInt(this.imageHeight,10) + "px");
domNode.setAttribute("height",this.imageHeight);
}
if(this.imageTooltip) {
domNode.setAttribute("title",this.imageTooltip);