Disable images support.

This commit is contained in:
Paulo Gustavo Veiga 2012-11-04 15:56:26 -03:00
parent cf0f0a8c00
commit 5cb2289cbc

View File

@ -167,39 +167,40 @@ mindplot.Designer = new Class({
} }
// Enable drag events ... // Enable drag events ...
Element.NativeEvents.dragenter = 2; // @Todo: Images support on progress ...
Element.NativeEvents.dragexit = 2; // Element.NativeEvents.dragenter = 2;
Element.NativeEvents.dragover = 2; // Element.NativeEvents.dragexit = 2;
Element.NativeEvents.drop = 2; // Element.NativeEvents.dragover = 2;
// Element.NativeEvents.drop = 2;
screenManager.addEvent('dragenter', noopHandler);
screenManager.addEvent('dragexit', noopHandler);
screenManager.addEvent('dragover', noopHandler);
screenManager.addEvent('drop', function (evt) {
evt.stopPropagation();
evt.preventDefault();
// //
var files = evt.event.dataTransfer.files; // screenManager.addEvent('dragenter', noopHandler);
console.log(event); // screenManager.addEvent('dragexit', noopHandler);
// screenManager.addEvent('dragover', noopHandler);
var count = files.length; // screenManager.addEvent('drop', function (evt) {
// evt.stopPropagation();
// Only call the handler if 1 or more files was dropped. // evt.preventDefault();
if (count > 0) { ////
// var files = evt.event.dataTransfer.files;
var model = this.getMindmap().createNode(); // console.log(event);
model.setImageSize(80, 43); //
model.setMetadata("{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&feature=g-vrec&context=G2b4ab69RVAAAAAAAAAA'}"); // var count = files.length;
model.setImageUrl("images/logo-small.png"); //
model.setShapeType(mindplot.model.TopicShape.IMAGE); // // Only call the handler if 1 or more files was dropped.
// if (count > 0) {
var position = screenManager.getWorkspaceMousePosition(evt); //
model.setPosition(position.x, position.y); // var model = this.getMindmap().createNode();
model.setPosition(100, 100); // model.setImageSize(80, 43);
// model.setMetadata("{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&feature=g-vrec&context=G2b4ab69RVAAAAAAAAAA'}");
this._actionDispatcher.addTopics([model]); // model.setImageUrl("images/logo-small.png");
} // model.setShapeType(mindplot.model.TopicShape.IMAGE);
}.bind(this)); //
// var position = screenManager.getWorkspaceMousePosition(evt);
// model.setPosition(position.x, position.y);
// model.setPosition(100, 100);
//
// this._actionDispatcher.addTopics([model]);
// }
// }.bind(this));
}, },