client/js/renderer/nodeeditor.js
changeset 461 48235ed6b07d
parent 459 98cae534083d
parent 450 88e8673aaeeb
child 468 364c367df7fc
equal deleted inserted replaced
460:bdf851bb1c4f 461:48235ed6b07d
    10 
    10 
    11     _(NodeEditor.prototype).extend({
    11     _(NodeEditor.prototype).extend({
    12         _init: function() {
    12         _init: function() {
    13             BaseEditor.prototype._init.apply(this);
    13             BaseEditor.prototype._init.apply(this);
    14             this.template = this.options.templates['templates/nodeeditor.html'];
    14             this.template = this.options.templates['templates/nodeeditor.html'];
       
    15             //this.templates['default']= this.options.templates['templates/nodeeditor.html'];
       
    16             //fusionner avec this.options.node_editor_templates
    15             this.readOnlyTemplate = this.options.templates['templates/nodeeditor_readonly.html'];
    17             this.readOnlyTemplate = this.options.templates['templates/nodeeditor_readonly.html'];
    16         },
    18         },
    17         draw: function() {
    19         draw: function() {
    18             var _model = this.source_representation.model,
    20             var _model = this.source_representation.model,
    19             _created_by = _model.get("created_by") || Utils._USER_PLACEHOLDER(this.renkan),
    21             _created_by = _model.get("created_by") || Utils._USER_PLACEHOLDER(this.renkan),
   236             this.editor_$.find("img").load(function() {
   238             this.editor_$.find("img").load(function() {
   237                 _this.redraw();
   239                 _this.redraw();
   238             });
   240             });
   239         },
   241         },
   240         redraw: function() {
   242         redraw: function() {
   241             var _coords = this.source_representation.paper_coords;
   243             if (this.options.popup_editor){
   242             Utils.drawEditBox(this.options, _coords, this.editor_block, this.source_representation.circle_radius * 0.75, this.editor_$);
   244                 var _coords = this.source_representation.paper_coords;
       
   245                 Utils.drawEditBox(this.options, _coords, this.editor_block, this.source_representation.circle_radius * 0.75, this.editor_$);                
       
   246             }
   243             this.editor_$.show();
   247             this.editor_$.show();
   244             paper.view.draw();
   248             paper.view.draw();
   245         }
   249         }
   246     }).value();
   250     }).value();
   247 
   251