diff options
| author | Gubolin <gubolin@fantasymail.de> | 2015-07-23 14:28:31 +0200 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2015-07-23 14:28:31 +0200 |
| commit | 29b5dba84e8f3aa95a3b9296d5a01a2609f4590d (patch) | |
| tree | 4ec090b68a695c6ba6d7bc26b6362519b485a0ba /widgets.js | |
| parent | 526a595c5e00f171eb814f063e58a6c18c5784d4 (diff) | |
| parent | 5aec52889d79a8257971095719195fabcbc33559 (diff) | |
| download | snap-gh-pages.tar.gz snap-gh-pages.zip | |
merge developmentgh-pages
Diffstat (limited to 'widgets.js')
| -rw-r--r-- | widgets.js | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -7,7 +7,7 @@ written by Jens Mönig jens@moenig.org - Copyright (C) 2014 by Jens Mönig + Copyright (C) 2015 by Jens Mönig This file is part of Snap!. @@ -74,7 +74,7 @@ HTMLCanvasElement, fontHeight, SymbolMorph, localize, SpeechBubbleMorph, ArrowMorph, MenuMorph, isString, isNil, SliderMorph, MorphicPreferences, ScrollFrameMorph*/ -modules.widgets = '2014-February-13'; +modules.widgets = '2015-June-25'; var PushButtonMorph; var ToggleButtonMorph; @@ -493,7 +493,7 @@ function ToggleButtonMorph( labelString, query, // predicate/selector environment, - hint, + hint, // optional, String or Function template, // optional, for cached background images minWidth, // <num> optional, if specified label will left-align hasPreview, // <bool> show press color on left edge (e.g. category) @@ -560,12 +560,13 @@ ToggleButtonMorph.prototype.init = function ( // ToggleButtonMorph events ToggleButtonMorph.prototype.mouseEnter = function () { + var contents = this.hint instanceof Function ? this.hint() : this.hint; if (!this.state) { this.image = this.highlightImage; this.changed(); } - if (this.hint) { - this.bubbleHelp(this.hint); + if (contents) { + this.bubbleHelp(contents); } }; |
