Go to file
Ezequiel Bergamaschi 0d11dee06c format
2014-01-24 02:47:51 -03:00
config/database Revert "adding directory table to sql scripts" 2014-01-21 01:46:04 -03:00
core-js Move to WiseMapping 3.1 2013-03-28 17:06:34 -03:00
distribution remove wrong js file on standalone-editor.xml 2014-01-19 18:22:13 -03:00
mindplot Fix image icon render. 2013-03-28 17:33:26 -03:00
projectFilesBackup removing Google Brix... no further comments 2013-03-14 23:57:38 +00:00
web2d Q! 2014-01-12 05:50:50 +00:00
wise-editor removing unnecesary build 2014-01-19 18:22:47 -03:00
wise-webapp format 2014-01-24 02:47:51 -03:00
.gitignore Fix parser error on export. 2012-11-01 00:14:21 -03:00
Compiling-and-running.md Compiling-and-running.md edited online with Bitbucket 2014-01-08 23:16:06 +00:00
Home.textile Home.textile edited online with Bitbucket 2014-01-08 23:18:24 +00:00
java.iml Control attributes order for freemind serialization. 2012-12-01 16:25:37 -03:00
license.txt Update copyright year. 2012-11-01 21:35:01 -03:00
pom.xml Fix 2014-01-05 22:03:41 +00:00
Procfile Minor fix. 2012-08-25 11:48:45 -03:00
README.md adding missing info to README.md 2014-01-19 18:21:18 -03:00

Project Information

The goal of this project is to provide a high quality product that can be deployed by educational and academic institutions, private and public companies and anyone who needs to have a mindmapping application. WiseMapping is based on the same code source supporting WiseMapping.com. More info: www.wisemapping.org

Compiling and Running

Prerequisites

The following products must be installed:

* Java Development Kit 7 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html])
* Maven 3.x or higher ([http://maven.apache.org/])

Compiling

WiseMapping uses Maven as packaging and project management. It's composed of 5 maven sub-modules:

* core-js: Utilities JavaScript classes
* web2d: JavaScript 2D SVG abstraction library used by the mind map editor
* mindplot: JavaScript mindmap designer core
* wise-editor: Mindmap Editor standalone distribution
* wise-webapp: J2EE web application 

The full compilation of the project can be performed executing within :

mvn package

Once this command is execute, the file /wise-webapp/target/wisemapping*.war will be generated.

Testing

The previously generated war can be deployed locally executing within the directory /wise-webapp the following command:

cd wise-webapp;mvn jetty:run-war

This will start the application on the URL: [http://localhost:8080/wise-webapp/]. Additionally, a file based database is automatically populated with a test user.

User: test@wisemapping.org Password: test

Running the JS only version

Start by creating the .zip file:

mvn assembly:assembly -Dmaven.test.skip=true

To test the javascript frontend you then do:

ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port=>8000,:DocumentRoot=>".").start'

Now open a browser using the URL http://localhost:8000/wise-editor/src/main/webapp/

Attaching drag and drop events.

  1. Support for dragging TextNodes:

The following code is an example of how to add attach to the div dragImageNode the support for node dragging.

$("dragTextNode").addEvent('mousedown', function(event) {
    event.preventDefault();

    // Create a image node ...
    var mindmap = designer.getMindmap();
    var node = mindmap.createNode();
    node.setText("Node Text !!!!");
    node.setMetadata("{'media':'test'}");
    node.setShapeType(mindplot.model.TopicShape.RECTANGLE);

    // Add link ...
    var link = node.createFeature(mindplot.TopicFeature.Link.id, {url:"http://www.wisemapping.com"});
    node.addFeature(link);

    // Add Note ...
    var note = node.createFeature(mindplot.TopicFeature.Note.id, {text:"This is a note"});
    node.addFeature(note);

    designer.addDraggedNode(event, node);
});

In the example, a new node is created with text "Node Text !!!!" and a note and a link associated to it when the user drop the node. Something to pay attention is the node.setMetadata("{}"), this delegated will be persisted during the serialization. Here you can store all the data you need.

  1. Support for dragging Images: Similar to the point 1,drag support is registered to the div dragImageNode.

         $("dragImageNode").addEvent('mousedown', function(event) {
             event.preventDefault();
    
             // Create a image node ...
             var mindmap = designer.getMindmap();
             var node = mindmap.createNode();
             node.setImageSize(80, 43);
             node.setMetadata("{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&feature=g-vrec&context=G2b4ab69RVAAAAAAAAAA'}");
             node.setImageUrl("images/logo-small.png");
             node.setShapeType(mindplot.model.TopicShape.IMAGE);
    
             designer.addDraggedNode(event, node);
         });
    

The node.setShapeType(mindplot.model.TopicShape.IMAGE) defines a image node. This makes mandatory the set of setImageUrl and setImageSize properties in the node.

  1. An event registration mechanism for Image nodes edit events: The next snipped show how to register a custom edition handler.

         designer.addEvent("editnode", function(event) {
             var node = event.model;
    
             alert("Node Id:" + node.getId());
             alert("Node Metadata:" + node.getMetadata());
             alert("Is Read Only:" + event.readOnly);
    } });
    

Authors

  • Pablo Luna
  • Paulo Veiga

Past Collaborators: Ignacio Manzano, Nicolas Damonte

License

The source code is Licensed under the WiseMapping Open License, Version 1.0 (the “License”); You may obtain a copy of the License at: [https://wisemapping.atlassian.net/wiki/display/WS/License]