From 61f171513bf45cf5eec273d82e1c8c5212aad689 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 24 Nov 2014 17:19:53 +0300 Subject: [PATCH] a bugfix in .load(..)... Signed-off-by: Alex A. Naanou --- ui (gen4)/viewer.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index bad01bab..f631e0bb 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -215,7 +215,6 @@ actions.Actions({ } }, - // basic life-cycle actions... // load: [ @@ -673,12 +672,15 @@ actions.Actions(Client, { ? this.ribbons.viewer : viewer - if(this.ribbons == null){ - this.ribbons = ribbons.Ribbons(viewer, this.images) - // XXX is this correct??? - this.ribbons.__image_updaters = [this.updateImage.bind(this)] + // XXX do we need to recycle the ribbons??? + if(this.ribbons != null){ + this.ribbons.clear() } + this.ribbons = ribbons.Ribbons(viewer, this.images) + // XXX is this correct??? + this.ribbons.__image_updaters = [this.updateImage.bind(this)] + this.reload() } }],