I think this is the wrong place for this.  Viewer shouldn't know about the mixin.  The mixin can wrap resize with `wrapFunction` to add this additional resize logic.