diff --git a/library.htm b/library.htm index edf5106..9dde471 100644 --- a/library.htm +++ b/library.htm @@ -370,7 +370,10 @@ newDiagram = diagram.clone();

Creates a copy of the diagram. If options are given, they will override the current diagram’s state (options is passed to the constructor of the new -object, so all the same options are available). +object, so all the same options are available). Note that by default, the +namespace will not be cloned (a new unique namespace will be +generated). Also the container will not be cloned; you will need +to specify one explicitly or manually attach the new diagram at a later point.

.set

@@ -409,19 +412,6 @@ Optionally, the result of an earlier call to process can be provided.

-

.setHighlight

- -
-diagram.setHighlight(line);
-diagram.setHighlight();
-
- -

-Marks elements generated by the specified line with a "focus" CSS class, which -can be used to style them. Only one line can be highlighted at a time. Calling -with no parameter (or null) will remove the highlighting. -

-

.addTheme

@@ -537,6 +527,66 @@ node = diagram.dom();
 Returns the base SVG element which the diagram has been rendered into.
 

+

.setHighlight

+ +
+diagram.setHighlight(line);
+diagram.setHighlight();
+
+ +

+Marks elements generated by the specified line with a "focus" CSS class, which +can be used to style them. Only one line can be highlighted at a time. Calling +with no parameter (or null) will remove the highlighting. +

+ +

.addEventListener

+ +
+diagram.addEventListener(type, callback);
+
+ +

+Registers an event listener. The available events are:

+ +

mouseover and click are invoked with a single +parameter: the element. This object contains:

+ + +

.removeEventListener

+ +
+diagram.removeEventListener(type, callback);
+
+ +

+Removes a previously registered event listener. +

+ +

.removeAllEventListeners

+ +
+diagram.removeAllEventListeners(type);
+diagram.removeAllEventListeners();
+
+ +

+Removes all registered event listeners for a given type, or all event listeners +for all types. +

+

Thanks