Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Labels have a transparent background by default.

Widgets allow you to null their BackgroundImageURI.
  • Loading branch information...
commit dee921e7e7780bedadd6be8aee5caade2f03edd4 1 parent 039798a
Andrew Janssen authored
11 compiled/bundled/fenestra.js
View
@@ -408,12 +408,11 @@
};
Widget.prototype.setBackgroundImageUri = function(newUri) {
- if (typeof newUri !== "string") {
+ if ((typeof newUri !== "string") && (newUri !== null)) {
throw "Illegal BackgroundImageUri.";
- } else {
- if (newUri === "") {
- throw "To clear a background image, set this property to null.";
- }
+ }
+ if (newUri === "") {
+ throw "To clear a background image, set this property to null.";
}
this.backgroundImageUri = newUri;
this.backgroundImageLoaded = false;
@@ -2255,7 +2254,7 @@
return nop = 0;
};
this.setSize(100, 10);
- this.setBackgroundStyle('#ffffff');
+ this.setBackgroundStyle('transparent');
this.setStrokeStyle('transparent');
return this;
};
2  compiled/label.js
View
@@ -11,7 +11,7 @@
return nop = 0;
};
this.setSize(100, 10);
- this.setBackgroundStyle('#ffffff');
+ this.setBackgroundStyle('transparent');
this.setStrokeStyle('transparent');
return this;
};
9 compiled/widget.js
View
@@ -186,12 +186,11 @@
};
Widget.prototype.setBackgroundImageUri = function(newUri) {
- if (typeof newUri !== "string") {
+ if ((typeof newUri !== "string") && (newUri !== null)) {
throw "Illegal BackgroundImageUri.";
- } else {
- if (newUri === "") {
- throw "To clear a background image, set this property to null.";
- }
+ }
+ if (newUri === "") {
+ throw "To clear a background image, set this property to null.";
}
this.backgroundImageUri = newUri;
this.backgroundImageLoaded = false;
2  src/label.coffee
View
@@ -15,7 +15,7 @@ window.Label = (newParent, newTitle) ->
@onClick = () ->
nop = 0
@setSize(100, 10)
- @setBackgroundStyle '#ffffff'
+ @setBackgroundStyle 'transparent'
@setStrokeStyle 'transparent'
this
4 src/widget.coffee
View
@@ -233,9 +233,9 @@
@backgroundImageUri
Widget::setBackgroundImageUri = (newUri) ->
- if typeof newUri != "string"
+ if (typeof newUri != "string") and (newUri != null)
throw "Illegal BackgroundImageUri."
- else throw "To clear a background image, set this property to null." if newUri == ""
+ throw "To clear a background image, set this property to null." if newUri == ""
@backgroundImageUri = newUri
@backgroundImageLoaded = false
@backgroundImageNode = null
Please sign in to comment.
Something went wrong with that request. Please try again.