diff --git a/ui (gen4)/features/collections.js b/ui (gen4)/features/collections.js index c7aa8cca..ebf5e6d1 100755 --- a/ui (gen4)/features/collections.js +++ b/ui (gen4)/features/collections.js @@ -923,8 +923,11 @@ module.UICollection = core.ImageGridFeatures.Feature({ }], // maintain crop viewer state when loading/unloading collections... - ['collectionLoaded collectionUnloaded', + ['load clear reload collectionLoaded collectionUnloaded', function(){ + if(!this.dom){ + return + } this.dom[this.collection ? 'addClass' : 'removeClass']('collection-mode') diff --git a/ui (gen4)/features/ui.js b/ui (gen4)/features/ui.js index c4d8979c..ff3e6f09 100755 --- a/ui (gen4)/features/ui.js +++ b/ui (gen4)/features/ui.js @@ -750,8 +750,11 @@ module.Viewer = core.ImageGridFeatures.Feature({ // manage the .crop-mode css class... // XXX this is not the right spot for this... // ...but this is a bit too small for a stand-alone feature... - ['crop uncrop', + ['load reload clear crop uncrop', function(){ + if(!this.dom){ + return + } this.dom[this.cropped ? 'addClass' : 'removeClass']('crop-mode')