client/posts: introduce post model

Now to replace all the api calls in views with event system... and then
do the same for user, tag and comment
This commit is contained in:
rr-
2016-06-13 23:28:55 +02:00
parent 6fcf81e55d
commit 2ac8d8650c
3 changed files with 93 additions and 6 deletions

View File

@ -6,9 +6,6 @@ const optimizedResize = require('../util/optimized_resize.js');
class PostContentControl {
constructor(containerNode, post, viewportSizeCalculator) {
post.canvasWidth = post.canvasWidth || 800;
post.canvasHeight = post.canvasHeight || 450;
this._post = post;
this._viewportSizeCalculator = viewportSizeCalculator;
this._containerNode = containerNode;