updateSizeReading(size, unit, target) {
    if (size === 0) {
      return;
    }
    let emSize, pxSize;

    if (unit === 'em') {
      // if size value is in em units
      emSize = size;
      pxSize = Math.floor(size * this.bodySize);
    } else {
      // if value is px or absent
      pxSize = size;
      emSize = size / this.bodySize;
    }

    if (target === 'updatePxInput') {
      store.dispatch(updateViewportPx(pxSize));
    } else if (target === 'updateEmInput') {
      store.dispatch(updateViewportEm(emSize.toFixed(2)));
    } else {
      store.dispatch(updateViewportPx(pxSize));
      store.dispatch(updateViewportEm(emSize.toFixed(2)));
    }
  }
// 'target' is what inputs to update. Defaults to both
'target' is what inputs to update. Defaults to both
' target ' is what inputs to update . Defaults to both
updateSizeReading(size, unit, target) {
    if (size === 0) {
      return;
    }
    let emSize, pxSize;
    if (unit === 'em') {
      emSize = size;
      pxSize = Math.floor(size * this.bodySize);
    } else {
      pxSize = size;
      emSize = size / this.bodySize;
    }
    if (target === 'updatePxInput') {
      store.dispatch(updateViewportPx(pxSize));
    } else if (target === 'updateEmInput') {
      store.dispatch(updateViewportEm(emSize.toFixed(2)));
    } else {
      store.dispatch(updateViewportPx(pxSize));
      store.dispatch(updateViewportEm(emSize.toFixed(2)));
    }
  }
updateSizeReading ( size , unit , target ) { if ( size === 0 ) { return ; } let emSize , pxSize ; if ( unit === 'em' ) { emSize = size ; pxSize = Math . floor ( size * this . bodySize ) ; } else { pxSize = size ; emSize = size / this . bodySize ; } if ( target === 'updatePxInput' ) { store . dispatch ( updateViewportPx ( pxSize ) ) ; } else if ( target === 'updateEmInput' ) { store . dispatch ( updateViewportEm ( emSize . toFixed ( 2 ) ) ) ; } else { store . dispatch ( updateViewportPx ( pxSize ) ) ; store . dispatch ( updateViewportEm ( emSize . toFixed ( 2 ) ) ) ; } }
'target' is what inputs to update.
' target ' is what inputs to update .
// if size value is in em units // if value is px or absent