Class: Diagram#
@deathbeds/ipydrawio.Diagram
A document for using offline drawio in an iframe
Hierarchy#
IFrame
↳
Diagram
Constructors#
constructor#
• new Diagram(options
)
Parameters#
Name |
Type |
---|---|
|
Overrides#
IFrame.constructor
Defined in#
Properties#
adapter#
• adapter: IAdapter
Defined in#
revealed#
• revealed: Promise
<void
>
Defined in#
Accessors#
app#
• get
app(): IMXApp
Returns#
Defined in#
packages/ipydrawio/src/editor.ts:98
• set
app(app
): void
Parameters#
Name |
Type |
---|---|
|
Returns#
void
Defined in#
appChanged#
• get
appChanged(): Signal
<Diagram
,
void
>
A signal emitted when the underlying drawio app changes
Returns#
Signal
<Diagram
, void
>
Defined in#
escaped#
• get
escaped(): ISignal
<Diagram
, void
>
A signal emitted when the user indicates they want to return focus to the main app
Returns#
ISignal
<Diagram
, void
>
Defined in#
format#
• get
format(): null
|
IFormat
<string
>
Returns#
null
| IFormat
<string
>
Defined in#
frameClicked#
• get
frameClicked(): Signal
<Diagram
,
void
>
Returns#
Signal
<Diagram
, void
>
Defined in#
loaded#
• get
loaded(): ISignal
<Diagram
, void
>
A signal emitted when a load action completes
Returns#
ISignal
<Diagram
, void
>
Defined in#
ready#
• get
ready(): Promise
<void
>
A promise that resolves when drawio is ready.
Returns#
Promise
<void
>
Defined in#
Methods#
exportAs#
▸ exportAs(format
): Promise
<string
>
Get a an export string in one of the supported formats.
Parameters#
Name |
Type |
---|---|
|
|
Returns#
Promise
<string
>
Defined in#
handleMessageEvent#
▸ handleMessageEvent(evt
): void
Handle messages from the iframe over the drawio embed protocol
Parameters#
Name |
Type |
---|---|
|
|
Returns#
void
Defined in#
load#
▸ load(xml
): void
Parameters#
Name |
Type |
---|---|
|
|
Returns#
void
Defined in#
maybeReloadFrame#
▸ maybeReloadFrame(force?
): void
Determine the URL for the iframe src, reload if changed
Parameters#
Name |
Type |
Default value |
---|---|---|
|
|
|
Returns#
void
Defined in#
onAfterShow#
▸ onAfterShow(msg?
): void
Install the message listener, the first time, and potentially reload the frame
Parameters#
Name |
Type |
---|---|
|
|
Returns#
void
Overrides#
IFrame.onAfterShow
Defined in#
onContentChanged#
▸ onContentChanged(): void
Handle a change to the raw document
Returns#
void
Defined in#
onSaveMsg#
▸ onSaveMsg(msg
, hardSave?
): void
Parameters#
Name |
Type |
Default value |
---|---|---|
|
|
|
|
|
|
Returns#
void
Defined in#
packages/ipydrawio/src/editor.ts:207
Copyright 2022 ipydrawio contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.