2012-03-07 20:35:06 -03:00
|
|
|
/*
|
2015-04-12 00:15:12 -03:00
|
|
|
* Copyright [2015] [wisemapping]
|
2012-03-07 20:35:06 -03:00
|
|
|
*
|
|
|
|
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
|
|
|
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
|
|
|
* "powered by wisemapping" text requirement on every single page;
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the license at
|
|
|
|
*
|
|
|
|
* http://www.wisemapping.org/license
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2014-05-13 01:04:42 -03:00
|
|
|
//FIXME: this Class should be reimplemented
|
2015-03-23 09:25:54 +01:00
|
|
|
mindplot.util.FadeEffect = new Class(/** @lends FadeEffect */{
|
2014-05-13 01:04:42 -03:00
|
|
|
Extends: mindplot.Events,
|
2015-03-23 09:25:54 +01:00
|
|
|
/**
|
|
|
|
* @extends mindplot.Events
|
|
|
|
* @constructs
|
|
|
|
* @param elements
|
|
|
|
* @param isVisible
|
|
|
|
*/
|
2012-03-07 20:35:06 -03:00
|
|
|
initialize: function(elements, isVisible) {
|
|
|
|
this._isVisible = isVisible;
|
|
|
|
this._element = elements;
|
|
|
|
},
|
|
|
|
|
2015-03-23 09:25:54 +01:00
|
|
|
/** */
|
2012-03-07 20:35:06 -03:00
|
|
|
start: function(){
|
2014-05-13 01:04:42 -03:00
|
|
|
var visible = this._isVisible;
|
2014-03-17 00:36:29 -03:00
|
|
|
_.each(this._element, function(elem) {
|
2014-05-13 01:04:42 -03:00
|
|
|
if(elem){
|
|
|
|
elem.setVisibility(visible);
|
|
|
|
}
|
2012-03-07 20:35:06 -03:00
|
|
|
});
|
2014-05-13 01:04:42 -03:00
|
|
|
this._isVisible = !visible;
|
|
|
|
this.fireEvent('complete');
|
2012-03-07 20:35:06 -03:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|