Forked from lakenen/crocodoc.viewer.layout-presentation-vertical.js
Created
July 28, 2014 02:40
-
-
Save jkirkell/2054fd137afe39709b31 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileoverview layout-presentation-vertical component definition | |
* @author lakenen | |
*/ | |
(function () { | |
var componentName = 'layout-presentation-vertical'; | |
var mixins = [ | |
'layout-' + Crocodoc.LAYOUT_PRESENTATION, | |
'layout-' + Crocodoc.LAYOUT_VERTICAL | |
]; | |
// create a new layout component that requests presentation and vertical layouts as mixins | |
Crocodoc.addComponent(componentName, mixins, function (scope, presentation, vertical) { | |
// extend presentation layout with some custom functionality | |
return presentation.extend({ | |
// initialize the layout | |
init: function () { | |
var config = scope.getConfig(); | |
// reset the layout name to 'presentation' | |
config.layout = Crocodoc.LAYOUT_PRESENTATION; | |
presentation.init.call(this); | |
}, | |
// override calculateZoomAutoValue behavior to match that of layout 'vertical' | |
calculateZoomAutoValue: vertical.calculateZoomAutoValue | |
})); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment