Commit bad15cc8 authored by csillag's avatar csillag

Update Annotator to 6623b2c2 (typed-packaging branch)

parent 3ab5ceaa
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-6da826c
** Annotator 1.2.6-dev-6623b2c
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2014-11-21 11:06:29Z
** Built at: 2014-12-11 01:33:32Z
*/
......@@ -1205,9 +1205,7 @@
Annotator.prototype._scan = function() {
var _this = this;
if (!this.domMapper) {
this._chooseAccessPolicy();
}
this._chooseAccessPolicy();
try {
this.pendingScan = this.domMapper.scan();
} catch (_error) {
......@@ -1426,18 +1424,15 @@
};
Annotator.prototype.setupAnnotation = function(annotation) {
var anchor, exception, pageIndex, result, t, _base, _k, _l, _len2, _ref1, _ref2, _ref3, _ref4;
var anchor, exception, pageIndex, result, t, _base, _k, _l, _len2, _ref1, _ref2, _ref3, _ref4, _ref5;
if (annotation.target == null) {
annotation.target = this.selectedTargets;
}
this.selectedTargets = [];
if (annotation.target == null) {
throw new Error("Can not run setupAnnotation(). No target or selection available.");
}
annotation.anchors = [];
_ref1 = annotation.target;
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
t = _ref1[_k];
_ref2 = (_ref1 = annotation.target) != null ? _ref1 : [];
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
t = _ref2[_k];
try {
result = this.createAnchor(annotation, t);
anchor = result.result;
......@@ -1448,7 +1443,7 @@
t.diffHTML = anchor.diffHTML;
t.diffCaseOnly = anchor.diffCaseOnly;
annotation.anchors.push(anchor);
for (pageIndex = _l = _ref2 = anchor.startPage, _ref3 = anchor.endPage; _ref2 <= _ref3 ? _l <= _ref3 : _l >= _ref3; pageIndex = _ref2 <= _ref3 ? ++_l : --_l) {
for (pageIndex = _l = _ref3 = anchor.startPage, _ref4 = anchor.endPage; _ref3 <= _ref4 ? _l <= _ref4 : _l >= _ref4; pageIndex = _ref3 <= _ref4 ? ++_l : --_l) {
if ((_base = this.anchors)[pageIndex] == null) {
_base[pageIndex] = [];
}
......@@ -1458,7 +1453,7 @@
}
} catch (_error) {
exception = _error;
console.log("Error in setupAnnotation for", annotation.id, ":", (_ref4 = exception.stack) != null ? _ref4 : exception);
console.log("Error in setupAnnotation for", annotation.id, ":", (_ref5 = exception.stack) != null ? _ref5 : exception);
}
}
return annotation;
......@@ -1509,9 +1504,6 @@
};
clone = annotations.slice();
if (annotations.length) {
if (!this.domMapper) {
this._scan();
}
if (this.pendingScan != null) {
this.pendingScan.then(function() {
return setTimeout(function() {
......
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-18d8f72
** Annotator 1.2.6-dev-6623b2c
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2014-12-08 17:27:52Z
** Built at: 2014-12-11 01:33:35Z
*/
......@@ -18,12 +18,12 @@
// Generated by CoffeeScript 1.6.3
(function() {
var PDFTextMapper, _ref,
var _ref,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty,
__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; };
PDFTextMapper = (function(_super) {
window.PDFTextMapper = (function(_super) {
__extends(PDFTextMapper, _super);
PDFTextMapper.isPDFDocument = function() {
......
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-9e0eff3
** Annotator 1.2.6-dev-6623b2c
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2014-09-25 22:40:57Z
** Built at: 2014-12-11 01:33:34Z
*/
......@@ -101,13 +101,9 @@
Store.prototype.annotationDeleted = function(annotation) {
var _this = this;
if (__indexOf.call(this.annotations, annotation) >= 0) {
if (annotation._clientdeleteonly != null) {
return this.unregisterAnnotation(annotation);
} else {
return this._apiRequest('destroy', annotation, (function() {
return _this.unregisterAnnotation(annotation);
}));
}
return this._apiRequest('destroy', annotation, (function() {
return _this.unregisterAnnotation(annotation);
}));
}
};
......
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-9e0eff3
** Annotator 1.2.6-dev-95b7a09
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2014-09-25 22:40:59Z
** Built at: 2014-12-03 11:41:09Z
*/
......@@ -91,19 +91,6 @@
return r;
};
TextHighlight.prototype._highlightRanges = function(normedRanges, cssClass) {
var highlights, r, _i, _len;
if (cssClass == null) {
cssClass = 'annotator-hl';
}
highlights = [];
for (_i = 0, _len = normedRanges.length; _i < _len; _i++) {
r = normedRanges[_i];
this.$.merge(highlights, this._highlightRange(r, cssClass));
}
return highlights;
};
function TextHighlight(anchor, pageIndex, normedRange) {
TextHighlight.__super__.constructor.call(this, anchor, pageIndex);
TextHighlight._init(this.annotator);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment