mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 15:37:56 +01:00
FadeEffect not working but hide and show correctly
This commit is contained in:
parent
1592f3caa7
commit
524b0167bf
@ -16,36 +16,23 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//FIXME: this Class should be reimplemented
|
||||||
mindplot.util.FadeEffect = new Class({
|
mindplot.util.FadeEffect = new Class({
|
||||||
// Extends: Fx,
|
Extends: mindplot.Events,
|
||||||
initialize: function(elements, isVisible) {
|
initialize: function(elements, isVisible) {
|
||||||
console.error("Re-impl required ....");
|
|
||||||
this.parent({duration:3000,frames:15,transition:'linear'});
|
|
||||||
this._isVisible = isVisible;
|
this._isVisible = isVisible;
|
||||||
this._element = elements;
|
this._element = elements;
|
||||||
|
|
||||||
|
|
||||||
this.addEvent('complete', function() {
|
|
||||||
_.each(this._element, function(elem) {
|
|
||||||
if(elem){
|
|
||||||
elem.setVisibility(isVisible);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
start: function(){
|
start: function(){
|
||||||
this.parent(this._isVisible ? 0 : 1, this._isVisible ? 1 : 0);
|
var visible = this._isVisible;
|
||||||
},
|
|
||||||
|
|
||||||
set: function(now) {
|
|
||||||
_.each(this._element, function(elem) {
|
_.each(this._element, function(elem) {
|
||||||
if(elem){
|
if(elem){
|
||||||
elem.setOpacity(now);
|
elem.setVisibility(visible);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return this;
|
this._isVisible = !visible;
|
||||||
|
this.fireEvent('complete');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user