Class gui.ImageController
Defined in: ImageController.js.
Constructor Attributes | Constructor Name and Description |
---|---|
gui.ImageController(session, sessionConstraints, sessionContext, inputMemberId, objectNameGenerator)
|
Field Attributes | Field Name and Description |
---|---|
<static> |
gui.ImageController.enabledChanged
|
Method Attributes | Method Name and Description |
---|---|
<inner> |
createAddFrameStyleOp(styleName, parentStyleName)
|
<inner> |
createAddGraphicsStyleOp(name)
|
destroy(callback,)
|
|
<inner> |
getFileExtension(mimetype)
|
insertImage(mimetype, content, widthInPx, heightInPx)
|
|
<inner> |
insertImageInternal(mimetype, content, widthMeasure, heightMeasure)
|
<inner> |
onCursorEvent(cursor)
|
<inner> |
scaleToAvailableContentSize(originalSize, pageContentSize)
Scales the supplied image rect to fit within the page content horizontal
and vertical limits, whilst preserving the aspect ratio.
|
subscribe(eventid, cb)
|
|
unsubscribe(eventid, cb)
|
|
<inner> |
Class Detail
gui.ImageController(session, sessionConstraints, sessionContext, inputMemberId, objectNameGenerator)
- Parameters:
- {!ops.Session} session
- {!gui.SessionConstraints} sessionConstraints
- {!gui.SessionContext} sessionContext
- {!string} inputMemberId
- {!odf.ObjectNameGenerator} objectNameGenerator
Field Detail
<static>
gui.ImageController.enabledChanged
Method Detail
<inner>
{!ops.Operation}
createAddFrameStyleOp(styleName, parentStyleName)
- Parameters:
- {!string} styleName
- {!string} parentStyleName
- Returns:
- {!ops.Operation}
<inner>
{!ops.Operation}
createAddGraphicsStyleOp(name)
- Parameters:
- {!string} name
- Returns:
- {!ops.Operation}
{undefined}
destroy(callback,)
- Parameters:
- {!function(!Error=)} callback,
- passing an error object in case of error
- Returns:
- {undefined}
<inner>
{?string}
getFileExtension(mimetype)
- Parameters:
- {!string} mimetype
- Returns:
- {?string}
{undefined}
insertImage(mimetype, content, widthInPx, heightInPx)
- Parameters:
- {!string} mimetype
- {!string} content
- base64 encoded string
- {!number} widthInPx
- {!number} heightInPx
- Returns:
- {undefined}
<inner>
{undefined}
insertImageInternal(mimetype, content, widthMeasure, heightMeasure)
- Parameters:
- {!string} mimetype
- {!string} content
- base64 encoded string
- {!string} widthMeasure
- Width + units of the image
- {!string} heightMeasure
- Height + units of the image
- Returns:
- {undefined}
{!boolean}
isEnabled()
- Returns:
- {!boolean}
<inner>
{undefined}
onCursorEvent(cursor)
- Parameters:
- {!ops.OdtCursor} cursor
- Returns:
- {undefined}
<inner>
{!{width: number|height: number}}
scaleToAvailableContentSize(originalSize, pageContentSize)
Scales the supplied image rect to fit within the page content horizontal
and vertical limits, whilst preserving the aspect ratio.
- Parameters:
- {!{width: number|height: number}} originalSize
- {!{width: number|height: number}} pageContentSize
- Returns:
- {!{width: number|height: number}}
{undefined}
subscribe(eventid, cb)
- Parameters:
- {!string} eventid
- {!Function} cb
- Returns:
- {undefined}
{undefined}
unsubscribe(eventid, cb)
- Parameters:
- {!string} eventid
- {!Function} cb
- Returns:
- {undefined}
<inner>
{undefined}
updateEnabledState()
- Returns:
- {undefined}