Skip to content

Add event to create modification update #2

@LucienMP

Description

@LucienMP

See original repo this was forked to for feature request ; Original Repo Issue

How to compile the minimized example;

  1. clone this repo
  2. move to drawio/etc/build
  3. from command line type; ant
  4. Wait for compile to finish, you should see an app.min.js
  5. Change access permissions if on linux to 666 in src/main/webapp/js/app.min.js

How to test;

  • open the drawio/example/index.html from apache
  • open browser dev console and see various event messages from message handler

How to load DEBUG DrawIO non-minimized JS:

  1. Add URL to the https://.../drawio.git/src/main/webapp/index.html?dev=1&....other-param....
  2. Edit drawio.git/src/main/webapp/index.html : var mxDevUrl / drawDevUrl to point to localhost/drawio.git
  3. Edit drawio.git/src/main/webapp/index.html : mxscript( mxBasePAth + 'mxClient.js'); to mxscript( mxBasePAth + '/javascript/mxClient.js');
  4. git clone https://github.com/jgraph/mxgraph into drawio.git/src/main/

Tools;
Linux; install "apache ant" and "java" compiler, follow compile flow
Windows;

  1. Download Apache Ant Windows ZIP; https://ant.apache.org/bindownload.cgi
  2. Unzip to some folder like C:\ANT
  3. Download Oracle JDK ZIP ; https://www.oracle.com/java/technologies/javase-jdk15-downloads.html#license-lightbox
  4. Unzip to some folder like C:\JDK
  5. Open a command shell and ...
    5.1. add JDK to your path "SET PATH=%PATH%;C:\JDK\bin"
    5.2 Move to drawio/etc/build
    5.3 Then compile using "C:\ANT\bin\ant.bat"

NOTE:

The JSON actions can be seen in the below snippet.

EditorUi.js contains L11084:

     ...
     else if ( data.action == 'dialog' )
     ...

The autosave action can be seen in the below snippet, sometimes it triggers on EVERY change.
However not always.

EditorUi.js contains L11660:

     ...
     if( autosave && changeListener == null )
     {
         ...
         if( data != lastData && !ignoreChange )
         {
           ...
           parent.postMessage( 'autosave', ... );
           ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions