-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading private ele data is OK, but renderer data is not #2
Comments
Where am I reading private renderer data? I assume you're referring to the last line of the following: var CanvasRenderer = $$.extension('renderer', 'canvas');
function CssRenderer(options){
CanvasRenderer.call(this, options);
this.data.cssContainer = document.createElement('div');
this.data.cssContainer.className = "cssContainer";
this.data.cssContainer.style = $$.util.extend(this.data.cssContainer.style, {
postion: "absolute",
top: 0,
right: 0,
bottom: 0,
left: 0
});
this.data.container.appendChild( this.data.cssContainer );
}
CssRenderer.prototype = Object.create(CanvasRenderer.prototype);
CssRenderer.prototype.constructor = CssRenderer;
$$.util.extend(CssRenderer, CanvasRenderer); The CanvasRenderer class has a number of properties that are assigned prior to instantiation, is that what you're referring to? |
Accessing the shared |
Thank you for the feedback. I need to push forward on the project I'm using this in, but should be revisiting the codebase soon. |
Cool; good luck with your project. |
Reading private element data is fine and necessary. However, I would be hesitant to read private renderer data, as compatibility could easily break with changes to the renderer. Consider that the renderer could be subject to refactoring, API changes, changes in rendering technology, etc.
The text was updated successfully, but these errors were encountered: