51f86afe6e
- Created AbstractRenderer in rendering package - Created CachedRenderer and CachedFrameRenderer to extract basic frame caching logic from DrawingController - Created RendererManager to synchronize updates made to several Renderer settings - Moved FrameRenderer from pskl.rendering to pskl.rendering.frame - Fixed the resize of the drawing area when the window is resized
18 lines
775 B
JavaScript
18 lines
775 B
JavaScript
(function () {
|
|
var ns = $.namespace('pskl.rendering.frame');
|
|
|
|
/**
|
|
* Cached renderer that can uses the same constructor as pskl.rendering.FrameRenderer
|
|
* It will build a FrameRenderer on the fly to use as decorated renderer
|
|
* @param {HtmlElement} container HtmlElement to use as parentNode of the Frame
|
|
* @param {Object} renderingOptions
|
|
* @param {Array} classes array of strings to use for css classes
|
|
*/
|
|
ns.CachedFrameRenderer = function (container, renderingOptions, classes) {
|
|
var frameRenderer = new pskl.rendering.frame.FrameRenderer(container, renderingOptions, classes);
|
|
pskl.rendering.CachedRenderer.call(this, frameRenderer);
|
|
};
|
|
|
|
pskl.utils.inherit(pskl.rendering.frame.CachedFrameRenderer, pskl.rendering.CachedRenderer);
|
|
|
|
})();
|