Skip to content

Commit

Permalink
fix(full-data): fix full-data transition in IE*
Browse files Browse the repository at this point in the history
IE is so slow, it can't pick up nodes created by WET scripts when creating timelines,
so it won't animate side panel tab nodes.
Do not create this timeline if you can't find nodes; check if the timeline has 0 duration
just before the transition; if so, recreate the timeline.

Closes #8149
  • Loading branch information
AleksueiR committed Mar 19, 2015
1 parent 2cf8a54 commit db53793
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/js/RAMP/Modules/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ define([
mapToolbar
.find(".map-toolbar-item-button.tooltip-temp")
.parent(),
null, "destroy");
null, "destroy");

mapToolbar
.find(".map-toolbar-item-button.tooltip-temp")
Expand All @@ -789,6 +789,10 @@ define([
timeLines;

createFullDataTL = function () {
if (panelDiv.find(".wb-tabs > ul li").length === 0) {
return;
}

fullDataTimeLine
.fromTo(mapDiv, transitionDuration, { width: "auto" }, { width: 35, ease: "easeOutCirc" }, 0)

Expand Down Expand Up @@ -963,6 +967,12 @@ define([
function _toggleFullDataMode(fullData) {
_isFullData = UtilMisc.isUndefined(fullData) ? !_isFullData : fullData;

// if the timeline duration is 0, reset it
// it's to work-around IE bug where it's so slow, it can't pick up nodes created by WET scripts when creating timelines
if (fullDataTimeLine.totalDuration() === 0) {
UtilMisc.resetTimelines([timeLines[0]]);
}

if (_isFullData) {
viewport.addClass("full-data-mode"); // set full-data-mode css class BEFORE animation; remove it after it finishes - on onReverseComplete callback
fullDataTimeLine.play();
Expand Down

0 comments on commit db53793

Please sign in to comment.