This repository was archived by the owner on Nov 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,9 @@ initWithoutGUI = (el, opts) ->
8181 if el .className .includes (' toolbar-hidden' ) == false
8282 el .className = el .className + ' toolbar-hidden'
8383
84+ if (' imageSize' of opts && ' height' of opts .imageSize )
85+ el .style .height = opts .imageSize .height + ' px'
86+
8487 drawingViewElement = document .createElement (' div' )
8588 drawingViewElement .className = ' lc-drawing'
8689 el .appendChild (drawingViewElement)
Original file line number Diff line number Diff line change @@ -70,16 +70,21 @@ const LiterallyCanvas = React.createClass({
7070
7171 render ( ) {
7272 const { lc, toolButtonComponents, props } = this ;
73- const { imageURLPrefix, toolbarPosition } = this . lc . opts ;
73+ const { imageURLPrefix, toolbarPosition, imageSize } = this . lc . opts ;
7474
7575 const pickerProps = { lc, toolButtonComponents, imageURLPrefix } ;
7676 const topOrBottomClassName = classSet ( {
7777 'toolbar-at-top' : toolbarPosition === 'top' ,
7878 'toolbar-at-bottom' : toolbarPosition === 'bottom' ,
7979 'toolbar-hidden' : toolbarPosition === 'hidden'
8080 } ) ;
81+
82+ const style = { }
83+ if ( imageSize . height )
84+ style . height = imageSize . height
85+
8186 return (
82- < div className = { `literally ${ topOrBottomClassName } ` } >
87+ < div className = { `literally ${ topOrBottomClassName } ` } style = { style } >
8388 < CanvasContainer ref = { item => this . canvas = item } />
8489 < Picker { ...pickerProps } />
8590 < Options lc = { lc } imageURLPrefix = { imageURLPrefix } />
You can’t perform that action at this time.
0 commit comments