Changeset 4:6979313586cf in OKFNAnnotator (for Zope) for annotator_files/lib/editor.js


Ignore:
Timestamp:
Aug 27, 2012, 5:05:38 PM (12 years ago)
Author:
casties
Branch:
default
Message:

new version of annotator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • annotator_files/lib/editor.js

    r3 r4  
     1// Generated by CoffeeScript 1.3.3
    12var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
    2   __hasProp = Object.prototype.hasOwnProperty,
    3   __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
     3  __hasProp = {}.hasOwnProperty,
     4  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
    45
    56Annotator.Editor = (function(_super) {
     
    2627  function Editor(options) {
    2728    this.onCancelButtonMouseover = __bind(this.onCancelButtonMouseover, this);
     29
    2830    this.processKeypress = __bind(this.processKeypress, this);
     31
    2932    this.submit = __bind(this.submit, this);
     33
    3034    this.load = __bind(this.load, this);
     35
    3136    this.hide = __bind(this.hide, this);
    32     this.show = __bind(this.show, this);    Editor.__super__.constructor.call(this, $(this.html)[0], options);
     37
     38    this.show = __bind(this.show, this);
     39    Editor.__super__.constructor.call(this, $(this.html)[0], options);
    3340    this.fields = [];
    3441    this.annotation = {};
     
    190197          textarea.height(height + (diff.top * directionY));
    191198          textarea.width(width + (diff.left * directionX));
    192           if (textarea.outerHeight() !== height) mousedown.top = event.pageY;
    193           if (textarea.outerWidth() !== width) mousedown.left = event.pageX;
     199          if (textarea.outerHeight() !== height) {
     200            mousedown.top = event.pageY;
     201          }
     202          if (textarea.outerWidth() !== width) {
     203            mousedown.left = event.pageX;
     204          }
    194205        } else if (mousedown.element === controls[0]) {
    195206          editor.css({
Note: See TracChangeset for help on using the changeset viewer.