lib/js/Component.js
function(size) {
      var t = this,
          css = _.clone(t.get('css')),
          parsedCss = $.parseStyleString(css['.nm-cv-viewport'] || '');
      if (!parsedCss.height && !parsedCss.width) {
        parsedCss.height = size.height + 'px';
        parsedCss.width = size.width + 'px';
        css['.nm-cv-viewport'] = $.makeStyleString(parsedCss);
        t.set({css: css});
      }
    }
function(size) {
      var t = this,
          css = _.clone(t.get('css')),
          parsedCss = $.parseStyleString(css['.nm-cv-viewport'] || '');
      if (!parsedCss.height && !parsedCss.width) {
        parsedCss.height = size.height + 'px';
        parsedCss.width = size.width + 'px';
        css['.nm-cv-viewport'] = $.makeStyleString(parsedCss);
        t.set({css: css});
      }
    }
function ( size ) { var t = this , css = _ . clone ( t . get ( 'css' ) ) , parsedCss = $ . parseStyleString ( css [ '.nm-cv-viewport' ] || '' ) ; if ( ! parsedCss . height && ! parsedCss . width ) { parsedCss . height = size . height + 'px' ; parsedCss . width = size . width + 'px' ; css [ '.nm-cv-viewport' ] = $ . makeStyleString ( parsedCss ) ; t . set ( { css : css } ) ; } }
Set the default component size

This will add CSS to set the component size if it hasn't already been set.

@method setDefaultSize
@param size {Object}
@param size.height {Integer} Default height
@param size.width {Integer} Default width
Set the default component size