Skip to content

Commit

Permalink
Remove instances of direct panel.actor access
Browse files Browse the repository at this point in the history
  • Loading branch information
alex4401 committed Sep 25, 2019
1 parent bcdcda0 commit a5941bd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions [email protected]/switcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ Switcher.prototype = {
let panels = this.getPanels();
panels.forEach(function(panel) {
try {
panel.actor.set_reactive(false);
let panelActor = (panel instanceof Clutter.Actor) ? panel : panel.actor
panelActor.set_reactive(false);
if (this._settings.hide_panel) {
Tweener.addTween(panel.actor, {
Tweener.addTween(panelActor, {
opacity: 0,
time: this._settings.animation_time,
transition: TRANSITION_TYPE
Expand Down Expand Up @@ -508,10 +509,11 @@ Switcher.prototype = {
let panels = this.getPanels();
panels.forEach(function(panel) {
try {
panel.actor.set_reactive(true);
let panelActor = (panel instanceof Clutter.Actor) ? panel : panel.actor
panelActor.set_reactive(true);
if (this._settings.hide_panel) {
Tweener.removeTweens(panel.actor);
Tweener.addTween(panel.actor, {
Tweener.removeTweens(panelActor);
Tweener.addTween(panelActor, {
opacity: 255,
time: this._settings.animation_time,
transition: TRANSITION_TYPE}
Expand Down

0 comments on commit a5941bd

Please sign in to comment.