Skip to content

Commit

Permalink
Fix GlassPane animation
Browse files Browse the repository at this point in the history
Only the element in the front will be animated.

160972

Change-Id: I647515a301b34b70dfb138b7d5bf8a997b2e7d1d
Signed-off-by: Fritz Schinkel <Fritz.Schinkel@bsi-software.com>
Reviewed-on: https://git.eclipse.org/r/160310
Reviewed-by: Claudio Guglielmo <claudio.guglielmo@bsiag.com>
Tested-by: Claudio Guglielmo <claudio.guglielmo@bsiag.com>
  • Loading branch information
fschinkel authored and cguglielmo committed Apr 7, 2020
1 parent 7f97b9a commit d2f19a0
Showing 1 changed file with 11 additions and 5 deletions.
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2014-2015 BSI Business Systems Integration AG.
* Copyright (c) 2014-2020 BSI Business Systems Integration AG.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -172,10 +172,16 @@ scout.GlassPaneRenderer.prototype._onMouseDown = function(event) {
}

if ($animationTarget) {
$animationTarget.addClassForAnimation('animate-modality-highlight', {
// remove animate-open as well, user may click the glasspane before the widget itself was able to remove the animate-open class
classesToRemove: 'animate-modality-highlight animate-open'
});
// If the animation target itself is covered by a glasspane, the event is passed on
var $glassPane = this._widget.$container.children('.glasspane');
if ($glassPane.length) {
$glassPane.trigger('mousedown');
} else {
$animationTarget.addClassForAnimation('animate-modality-highlight', {
// remove animate-open as well, user may click the glasspane before the widget itself was able to remove the animate-open class
classesToRemove: 'animate-modality-highlight animate-open'
});
}
}

$.suppressEvent(event);
Expand Down

0 comments on commit d2f19a0

Please sign in to comment.