Commit ffaf4253 authored by csillag's avatar csillag

Update Annotator to 4158d0a5 (typed-packaging branch)

parent b09290fc
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
class Annotator.Plugin.DomTextMapper extends Annotator.Plugin class Annotator.Plugin.DomTextMapper extends Annotator.Plugin
pluginInit: -> pluginInit: ->
if @options.skip
console.log "Not registering DOM-Text-Mapper."
return
@annotator.documentAccessStrategies.unshift @annotator.documentAccessStrategies.unshift
# Document access strategy for simple HTML documents, # Document access strategy for simple HTML documents,
# with enhanced text extraction and mapping features. # with enhanced text extraction and mapping features.
......
...@@ -6,9 +6,6 @@ class Annotator.Plugin.FuzzyTextAnchors extends Annotator.Plugin ...@@ -6,9 +6,6 @@ class Annotator.Plugin.FuzzyTextAnchors extends Annotator.Plugin
unless @annotator.plugins.TextAnchors unless @annotator.plugins.TextAnchors
console.warn "The FuzzyTextAnchors Annotator plugin requires the TextAnchors plugin. Skipping." console.warn "The FuzzyTextAnchors Annotator plugin requires the TextAnchors plugin. Skipping."
return return
unless @annotator.plugins.DomTextMapper
console.warn "The FuzzyTextAnchors Annotator plugin requires the DomTextMapper plugin. Skipping."
return
@Annotator = Annotator @Annotator = Annotator
...@@ -31,6 +28,9 @@ class Annotator.Plugin.FuzzyTextAnchors extends Annotator.Plugin ...@@ -31,6 +28,9 @@ class Annotator.Plugin.FuzzyTextAnchors extends Annotator.Plugin
code: this.fuzzyMatching code: this.fuzzyMatching
twoPhaseFuzzyMatching: (annotation, target) => twoPhaseFuzzyMatching: (annotation, target) =>
# This won't work without DTM
return unless @annotator.domMapper.getInfoForNode?
# Fetch the quote and the context # Fetch the quote and the context
quoteSelector = @annotator.findSelector target.selector, "TextQuoteSelector" quoteSelector = @annotator.findSelector target.selector, "TextQuoteSelector"
prefix = quoteSelector?.prefix prefix = quoteSelector?.prefix
...@@ -74,6 +74,9 @@ class Annotator.Plugin.FuzzyTextAnchors extends Annotator.Plugin ...@@ -74,6 +74,9 @@ class Annotator.Plugin.FuzzyTextAnchors extends Annotator.Plugin
unless match.exact then match.exactExceptCase unless match.exact then match.exactExceptCase
fuzzyMatching: (annotation, target) => fuzzyMatching: (annotation, target) =>
# This won't work without DTM
return unless @annotator.domMapper.getInfoForNode?
# Fetch the quote # Fetch the quote
quoteSelector = @annotator.findSelector target.selector, "TextQuoteSelector" quoteSelector = @annotator.findSelector target.selector, "TextQuoteSelector"
quote = quoteSelector?.exact quote = quoteSelector?.exact
......
...@@ -45,11 +45,6 @@ class Annotator.Plugin.TextPosition extends Annotator.Plugin ...@@ -45,11 +45,6 @@ class Annotator.Plugin.TextPosition extends Annotator.Plugin
@Annotator = Annotator @Annotator = Annotator
# Do we have the basic text anchors plugin loaded?
unless @annotator.plugins.DomTextMapper
console.warn "The TextPosition Annotator plugin requires the DomTextMapper plugin. Skipping."
return
# Register the creator for text quote selectors # Register the creator for text quote selectors
@annotator.selectorCreators.push @annotator.selectorCreators.push
name: "TextPositionSelector" name: "TextPositionSelector"
...@@ -67,8 +62,12 @@ class Annotator.Plugin.TextPosition extends Annotator.Plugin ...@@ -67,8 +62,12 @@ class Annotator.Plugin.TextPosition extends Annotator.Plugin
# Create a TextPositionSelector around a range # Create a TextPositionSelector around a range
_getTextPositionSelector: (selection) => _getTextPositionSelector: (selection) =>
# We only care about "text range" selections.
return [] unless selection.type is "text range" return [] unless selection.type is "text range"
# We need dom-text-mapper - style functionality
return [] unless @annotator.domMapper.getStartPosForNode?
startOffset = @annotator.domMapper.getStartPosForNode selection.range.start startOffset = @annotator.domMapper.getStartPosForNode selection.range.start
endOffset = @annotator.domMapper.getEndPosForNode selection.range.end endOffset = @annotator.domMapper.getEndPosForNode selection.range.end
......
...@@ -34,7 +34,7 @@ class Annotator.Plugin.TextQuote extends Annotator.Plugin ...@@ -34,7 +34,7 @@ class Annotator.Plugin.TextQuote extends Annotator.Plugin
unless rangeEnd? unless rangeEnd?
throw new Error "Called getTextQuoteSelector() on a range with no valid end." throw new Error "Called getTextQuoteSelector() on a range with no valid end."
if @annotator.plugins.DomTextMapper if @annotator.domMapper.getStartPosForNode?
# Calculate the quote and context using DTM # Calculate the quote and context using DTM
startOffset = @annotator.domMapper.getStartPosForNode rangeStart startOffset = @annotator.domMapper.getStartPosForNode rangeStart
......
...@@ -85,7 +85,7 @@ class Annotator.Plugin.TextRange extends Annotator.Plugin ...@@ -85,7 +85,7 @@ class Annotator.Plugin.TextRange extends Annotator.Plugin
return null return null
# Get the text of this range # Get the text of this range
currentQuote = @annotator.normalizeString if @annotator.plugins.DomTextMapper currentQuote = @annotator.normalizeString if @annotator.domMapper.getInfoForNode?
# Determine the current content of the given range using DTM # Determine the current content of the given range using DTM
startInfo = @annotator.domMapper.getInfoForNode normedRange.start startInfo = @annotator.domMapper.getInfoForNode normedRange.start
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:28Z ** Built at: 2014-05-28 15:05:59Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:29Z ** Built at: 2014-05-28 15:05:59Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:35Z ** Built at: 2014-05-28 15:06:05Z
*/ */
...@@ -32,6 +32,10 @@ ...@@ -32,6 +32,10 @@
DomTextMapper.prototype.pluginInit = function() { DomTextMapper.prototype.pluginInit = function() {
var _this = this; var _this = this;
if (this.options.skip) {
console.log("Not registering DOM-Text-Mapper.");
return;
}
return this.annotator.documentAccessStrategies.unshift({ return this.annotator.documentAccessStrategies.unshift({
name: "DOM-Text-Mapper", name: "DOM-Text-Mapper",
mapper: window.DomTextMapper, mapper: window.DomTextMapper,
......
{"version":3,"file":"annotator.domtextmapper.js","sources":["_preamble.coffee","_annotator_mapsrc/src/plugin/domtextmapper.coffee"],"names":[],"mappings":";AAAA;;;;;;;;;;CAAA;CAAA;;;;;;;ACCA;CAAA,GAAA,EAAA;KAAA;oSAAA;;CAAA,CAAM,IAAgB,GAAP;CAEb;;;;;CAAA;;CAAA,EAAY,MAAA,CAAZ;CACE,SAAA,EAAA;CAAC,GAAA,GAAD,EAAU,IAAV,WAAmC;CAGjC,CAAM,EAAN,IAAA,SAAA;CAAA,CACQ,IAAR,EAAA,KADA;CAAA,CAEM,CAAA,CAAN,IAAA,CAAM;CAAI,IAAA,EAAmD,EAA1C,EAAV,MAAA;CAFT,QAEM;CANE,OACV;CADF,IAAY;;CAAZ;;CAF2C,QAAS;CAAtD"} {"version":3,"file":"annotator.domtextmapper.js","sources":["_preamble.coffee","_annotator_mapsrc/src/plugin/domtextmapper.coffee"],"names":[],"mappings":";AAAA;;;;;;;;;;CAAA;CAAA;;;;;;;ACCA;CAAA,GAAA,EAAA;KAAA;oSAAA;;CAAA,CAAM,IAAgB,GAAP;CAEb;;;;;CAAA;;CAAA,EAAY,MAAA,CAAZ;CACE,SAAA,EAAA;CAAA,GAAG,EAAH,CAAW;CACT,EAAA,IAAO,CAAP,0BAAA;CACA,aAAA;QAFF;CAIC,GAAA,GAAD,EAAU,IAAV,WAAmC;CAGjC,CAAM,EAAN,IAAA,SAAA;CAAA,CACQ,IAAR,EAAA,KADA;CAAA,CAEM,CAAA,CAAN,IAAA,CAAM;CAAI,IAAA,EAAmD,EAA1C,EAAV,MAAA;CAFT,QAEM;CAVE,OAKV;CALF,IAAY;;CAAZ;;CAF2C,QAAS;CAAtD"}
\ No newline at end of file \ No newline at end of file
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:39Z ** Built at: 2014-05-28 15:06:11Z
*/ */
...@@ -39,10 +39,6 @@ ...@@ -39,10 +39,6 @@
console.warn("The FuzzyTextAnchors Annotator plugin requires the TextAnchors plugin. Skipping."); console.warn("The FuzzyTextAnchors Annotator plugin requires the TextAnchors plugin. Skipping.");
return; return;
} }
if (!this.annotator.plugins.DomTextMapper) {
console.warn("The FuzzyTextAnchors Annotator plugin requires the DomTextMapper plugin. Skipping.");
return;
}
this.Annotator = Annotator; this.Annotator = Annotator;
this.textFinder = new DomTextMatcher(function() { this.textFinder = new DomTextMatcher(function() {
return _this.annotator.domMapper.getCorpus(); return _this.annotator.domMapper.getCorpus();
...@@ -59,6 +55,9 @@ ...@@ -59,6 +55,9 @@
FuzzyTextAnchors.prototype.twoPhaseFuzzyMatching = function(annotation, target) { FuzzyTextAnchors.prototype.twoPhaseFuzzyMatching = function(annotation, target) {
var expectedEnd, expectedStart, match, options, posSelector, prefix, quote, quoteSelector, result, suffix; var expectedEnd, expectedStart, match, options, posSelector, prefix, quote, quoteSelector, result, suffix;
if (this.annotator.domMapper.getInfoForNode == null) {
return;
}
quoteSelector = this.annotator.findSelector(target.selector, "TextQuoteSelector"); quoteSelector = this.annotator.findSelector(target.selector, "TextQuoteSelector");
prefix = quoteSelector != null ? quoteSelector.prefix : void 0; prefix = quoteSelector != null ? quoteSelector.prefix : void 0;
suffix = quoteSelector != null ? quoteSelector.suffix : void 0; suffix = quoteSelector != null ? quoteSelector.suffix : void 0;
...@@ -85,6 +84,9 @@ ...@@ -85,6 +84,9 @@
FuzzyTextAnchors.prototype.fuzzyMatching = function(annotation, target) { FuzzyTextAnchors.prototype.fuzzyMatching = function(annotation, target) {
var expectedStart, len, match, options, posSelector, quote, quoteSelector, result; var expectedStart, len, match, options, posSelector, quote, quoteSelector, result;
if (this.annotator.domMapper.getInfoForNode == null) {
return;
}
quoteSelector = this.annotator.findSelector(target.selector, "TextQuoteSelector"); quoteSelector = this.annotator.findSelector(target.selector, "TextQuoteSelector");
quote = quoteSelector != null ? quoteSelector.exact : void 0; quote = quoteSelector != null ? quoteSelector.exact : void 0;
if (quote == null) { if (quote == null) {
......
{"version":3,"file":"annotator.fuzzytextanchors.js","sources":["_preamble.coffee","_annotator_mapsrc/src/plugin/fuzzytextanchors.coffee"],"names":[],"mappings":";AAAA;;;;;;;;;;CAAA;CAAA;;;;;;;ACCA;CAAA,GAA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AqB;CAEnB,GAAA,WAAO;QA3BT;CAAA,EA8BQ,EAAR,CAAA,CAAuB;AAWd,CALJ,CAAyC,CAA1C,CAAA,CACG,CADH,EAKF,CALY,CAAV,GAAA,EAMF,GANE;CAhEN,IA0BuB;;CA1BvB,CAwE4B,CAAb,GAAA,GAAC,CAAD,GAAf;CAEE,SAAA,mEAAA;CAAA,GAAc,EAAd,yCAAA;CAAA,aAAA;QAAA;CAAA,CAGyD,CAAzC,CAAC,EAAjB,EAAgB,CAAU,GAAV,CAAhB,MAAgB;CAHhB,EAIQ,EAAR,CAAA,OAAqB;CAGrB,GAAO,EAAP,OAAA;CAAmB,GAAA,WAAO;QAP1B;AAWA,CAAA,CAAA,EAAA,CAAmB,CAAnB;CAAA,aAAA;QAXA;CAAA,CAcuD,CAAzC,CAAC,EAAf,EAAc,CAAU,EAAxB,CAAc,UAAA;CAdd,EAegB,GAAhB,KAA2B,EAA3B;CAfA,EAkBA,CAAO,EAAP,GAAgB;;CAGM,EAAL,CAAI,CAAJ,GAAjB;QArBA;CAAA,EAyBE,GADF,CAAA;CACE,CAAe,CAAA,KAAf,KAAA;CAAA,CACqB,EADrB,IACA,WAAA;CA1BF,OAAA;CAAA,CA2BwC,CAA/B,CAAC,CAAD,CAAT,CAAS,GAAW,CAAX,EAAA;AAGF,CAAP,GAAA,EAAA,CAAqB;CAEnB,GAAA,WAAO;QAhCT;CAAA,EAmCQ,EAAR,CAAA,CAAuB;AAWd,CALJ,CAAyC,CAA1C,CAAA,CACG,CADH,EAKF,CALY,CAAV,GAAA,EAMF,GANE;CAnHN,IAwEe;;CAxEf;;CAF8C,QAAS;CAAzD"}
\ No newline at end of file \ No newline at end of file
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:24Z ** Built at: 2014-05-28 15:05:55Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:40Z ** Built at: 2014-05-28 15:06:12Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:32Z ** Built at: 2014-05-28 15:06:03Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:33Z ** Built at: 2014-05-28 15:06:04Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:36Z ** Built at: 2014-05-28 15:06:07Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:35Z ** Built at: 2014-05-28 15:06:06Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:38Z ** Built at: 2014-05-28 15:06:10Z
*/ */
...@@ -66,10 +66,6 @@ ...@@ -66,10 +66,6 @@
TextPosition.prototype.pluginInit = function() { TextPosition.prototype.pluginInit = function() {
this.Annotator = Annotator; this.Annotator = Annotator;
if (!this.annotator.plugins.DomTextMapper) {
console.warn("The TextPosition Annotator plugin requires the DomTextMapper plugin. Skipping.");
return;
}
this.annotator.selectorCreators.push({ this.annotator.selectorCreators.push({
name: "TextPositionSelector", name: "TextPositionSelector",
describe: this._getTextPositionSelector describe: this._getTextPositionSelector
...@@ -86,6 +82,9 @@ ...@@ -86,6 +82,9 @@
if (selection.type !== "text range") { if (selection.type !== "text range") {
return []; return [];
} }
if (this.annotator.domMapper.getStartPosForNode == null) {
return [];
}
startOffset = this.annotator.domMapper.getStartPosForNode(selection.range.start); startOffset = this.annotator.domMapper.getStartPosForNode(selection.range.start);
endOffset = this.annotator.domMapper.getEndPosForNode(selection.range.end); endOffset = this.annotator.domMapper.getEndPosForNode(selection.range.end);
if ((startOffset != null) && (endOffset != null)) { if ((startOffset != null) && (endOffset != null)) {
......
{"version":3,"file":"annotator.textposition.js","sources":["_preamble.coffee","_annotator_mapsrc/src/plugin/textposition.coffee"],"names":[],"mappings":";AAAA;;;;;;;;;;CAAA;CAAA;;;;;;;ACEA;CAAA,KAAA,kBAAA;KAAA;;uFAAA;;CAAA,CAAM;CAEJ;;CAAA,EAAa,CAAb,KAAA,SAAC;;CAEY,CAAY,CAAZ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,gBAAC;CAIZ,EAHG,CAAA,CAGH,CAHE;CAGF,EAHW,CAAA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OAAY;CAEZ,GAAG,EAAH,aAAA,EAAG;eACD;WACE;CAAA,CAAM,EAAN,QAAA,UAAA;CAAA,CACO,GAAP,MADA,CACA;CADA,CAEK,CAAL,MAFA,GAEA;YAHF;CADF;MAAA,EAAA;CASE,GAAO,IAAP,WAAA;CACE,CACE,CADF,EACiB,EADV,EACI,CADX,6BAAA,iBAAA;UADF;CAIA,GAAO,IAAP,SAAA;CACE,CACE,CADF,EACiB,EADV,EACI,CADX,2BAAA,mBAAA;UALF;CATF,cAiBE;QAvBsB;CAzB1B,IAyB0B;;CAzB1B,CAoDyC,CAAb,GAAA,GAAC,CAAD,gBAA5B;CAGE,SAAA,wCAAA;CAAA,CAAoD,CAAzC,CAAC,EAAZ,EAAA,CAAqB,GAAV,UAAA;CACX,GAAc,EAAd,UAAA;CAAA,aAAA;QADA;CAGA,GAAO,EAAP,gBAAA;CACE,EAAA,IAAO,CAAP,gEAAA;CACA,GAAA,WAAO;QALT;CAOA,GAAO,EAAP,cAAA;CACE,EAAA,IAAO,CAAP,8DAAA;CACA,GAAA,WAAO;QATT;CAAA,EAWU,CAAC,EAAX,CAAA,EAAoB,6CAAwD;CAX5E,EAYe,CAAC,EAAhB,CAAe,EAAU,GAAzB,GAAe;CAZf,IAauB,CAAvB,IAAA;CACA,GAAG,CAAkC,CAArC,IAAA,EAAmB,QAAhB;CAOD,GAAA,WAAO;QArBT;CAwBuB,CAAY,CAA/B,CAAA,CAAA,CAAA,EACM,CADN,CAAA,EAAA,CAAA,KAAA;CA/EN,IAoD4B;;CApD5B;;CAF0C,QAAS;CAvCrD"} {"version":3,"file":"annotator.textposition.js","sources":["_preamble.coffee","_annotator_mapsrc/src/plugin/textposition.coffee"],"names":[],"mappings":";AAAA;;;;;;;;;;CAAA;CAAA;;;;;;;ACEA;CAAA,KAAA,kBAAA;KAAA;;uFAAA;;CAAA,CAAM;CAEJ;;CAAA,EAAa,CAAb,KAAA,SAAC;;CAEY,CAAY,CAAZ,CAAA,CAAA,CAAA,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AxB,OAAc;CALd,EAMY,CAAC,CAAoD,CAAjE,GAAA,OAAY;CAEZ,GAAG,EAAH,aAAA,EAAG;eACD;WACE;CAAA,CAAM,EAAN,QAAA,UAAA;CAAA,CACO,GAAP,MADA,CACA;CADA,CAEK,CAAL,MAFA,GAEA;YAHF;CADF;MAAA,EAAA;CASE,GAAO,IAAP,WAAA;CACE,CACE,CADF,EACiB,EADV,EACI,CADX,6BAAA,iBAAA;UADF;CAIA,GAAO,IAAP,SAAA;CACE,CACE,CADF,EACiB,EADV,EACI,CADX,2BAAA,mBAAA;UALF;CATF,cAiBE;QA3BsB;CApB1B,IAoB0B;;CApB1B,CAmDyC,CAAb,GAAA,GAAC,CAAD,gBAA5B;CAGE,SAAA,wCAAA;CAAA,CAAoD,CAAzC,CAAC,EAAZ,EAAA,CAAqB,GAAV,UAAA;CACX,GAAc,EAAd,UAAA;CAAA,aAAA;QADA;CAGA,GAAO,EAAP,gBAAA;CACE,EAAA,IAAO,CAAP,gEAAA;CACA,GAAA,WAAO;QALT;CAOA,GAAO,EAAP,cAAA;CACE,EAAA,IAAO,CAAP,8DAAA;CACA,GAAA,WAAO;QATT;CAAA,EAWU,CAAC,EAAX,CAAA,EAAoB,6CAAwD;CAX5E,EAYe,CAAC,EAAhB,CAAe,EAAU,GAAzB,GAAe;CAZf,IAauB,CAAvB,IAAA;CACA,GAAG,CAAkC,CAArC,IAAA,EAAmB,QAAhB;CAOD,GAAA,WAAO;QArBT;CAwBuB,CAAY,CAA/B,CAAA,CAAA,CAAA,EACM,CADN,CAAA,EAAA,CAAA,KAAA;CA9EN,IAmD4B;;CAnD5B;;CAF0C,QAAS;CAvCrD"}
\ No newline at end of file \ No newline at end of file
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:39Z ** Built at: 2014-05-28 15:06:10Z
*/ */
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
if (rangeEnd == null) { if (rangeEnd == null) {
throw new Error("Called getTextQuoteSelector() on a range with no valid end."); throw new Error("Called getTextQuoteSelector() on a range with no valid end.");
} }
if (this.annotator.plugins.DomTextMapper) { if (this.annotator.domMapper.getStartPosForNode != null) {
startOffset = this.annotator.domMapper.getStartPosForNode(rangeStart); startOffset = this.annotator.domMapper.getStartPosForNode(rangeStart);
endOffset = this.annotator.domMapper.getEndPosForNode(rangeEnd); endOffset = this.annotator.domMapper.getEndPosForNode(rangeEnd);
if ((startOffset != null) && (endOffset != null)) { if ((startOffset != null) && (endOffset != null)) {
......
{"version":3,"file":"annotator.textquote.js","sources":["_preamble.coffee","_annotator_mapsrc/src/plugin/textquote.coffee"],"names":[],"mappings":";AAAA;;;;;;;;;;CAAA;CAAA;;;;;;;ACCA;CAAA,GAAA,EAAA;KAAA;;oSAAA;;CAAA,CAAM,IAAgB,GAAP;CAEb;;;;;;CAAA;;CAAA,EAAa,CAAb,KAAC;;CAAD,EACK,CAAL,KAAC;;CADD,EAIY,MAAA,CAAZ;CAGE,SAAA,EAAA;CAAA,GAAC,EAAD,GAAU,OAAiB;CACzB,CAAM,EAAN,IAAA,WAAA;CAAA,CACU,EAAC,IAAX,aADA;CADF,OAAA;CAKC,EAA8B,CAA9B,EAA8B,GAArB,IAAV,IAAA;CACE,OAAA,IAAA;CAAA,CAAoD,CAAzC,EAAC,CAA6B,EAAzC,CAAqB,GAAV,OAAA;CACX,GAAG,IAAH,QAAA;CACG,IAAA,GAAkC,CAAzB,MAAV,EAAA;MADF,IA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IAAO,EAAP,CAAA,CAAA,kCAAA;CAbF,gBAcE;UApBJ;MAAA,EAAA;eAuBE;WACE;CAAA,CAAM,EAAN,QAAA,OAAA;CAAA,CACO,EAAA,CAAP,IAAgB,GAAhB;YAFF;CAvBF;QAbqB;CApBvB,IAoBuB;;CApBvB;;CAFuC,QAAS;CAAlD"}
\ No newline at end of file \ No newline at end of file
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e987d3 ** Annotator 1.2.6-dev-4158d0a
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-05-24 00:12:37Z ** Built at: 2014-05-28 15:06:09Z
*/ */
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
error = _error; error = _error;
return null; return null;
} }
currentQuote = this.annotator.normalizeString(this.annotator.plugins.DomTextMapper ? (startInfo = this.annotator.domMapper.getInfoForNode(normedRange.start), startOffset = startInfo.start, endInfo = this.annotator.domMapper.getInfoForNode(normedRange.end), endOffset = endInfo.end, this.annotator.domMapper.getCorpus().slice(startOffset, +(endOffset - 1) + 1 || 9e9).trim()) : normedRange.text().trim()); currentQuote = this.annotator.normalizeString(this.annotator.domMapper.getInfoForNode != null ? (startInfo = this.annotator.domMapper.getInfoForNode(normedRange.start), startOffset = startInfo.start, endInfo = this.annotator.domMapper.getInfoForNode(normedRange.end), endOffset = endInfo.end, this.annotator.domMapper.getCorpus().slice(startOffset, +(endOffset - 1) + 1 || 9e9).trim()) : normedRange.text().trim());
savedQuote = typeof (_base = this.annotator).getQuoteForTarget === "function" ? _base.getQuoteForTarget(target) : void 0; savedQuote = typeof (_base = this.annotator).getQuoteForTarget === "function" ? _base.getQuoteForTarget(target) : void 0;
if ((savedQuote != null) && currentQuote !== savedQuote) { if ((savedQuote != null) && currentQuote !== savedQuote) {
return null; return null;
......
{"version":3,"file":"annotator.textrange.js","sources":["_preamble.coffee","_annotator_mapsrc/src/plugin/textrange.coffee"],"names":[],"mappings":";AAAA;;;;;;;;;;CAAA;CAAA;;;;;;;ACmBA;CAAA,KAAA,eAAA;KAAA;;uFAAA;;CAAA,CAAM;CAEJ;;CAAA,EAAa,CAAb,KAAA,MAAC;;CAEY,CAAY,CAAZ,CAAA,CAAA,CAAA,GAAA,CAAA,eAAC;CAEZ,EAF4C,CAAA,CAE5C,CAF2C;CAE3C,CAAiB,GAAjB,CAAA,GAAA,CAAA,uCAAM;CAEN,GAAO,EAAP,YAAA;CAAoB,GAAU,CAAA,SAAA,MAAA;QAF9B;CAAA,EAIa,CAAZ,EAAD,GAAA,MAA4B;CAR9B,IAEa;;CAFb,EAWkB,MAAA,OAAlB;CAGO,CAA8B,EAA/B,CAAA,IAAU,IAAV;CAdN,IAWkB;;CAXlB;;CAF4B,QAAS;;CAAvC,CAqBM,IAAgB,GAAP;CAEb;;;;;;;CAAA;;CAAA,EAAY,MAAA,CAAZ;CAEE,EAAa,CAAZ,EAAD,GAAA;CAAA,GAGC,EAAD,GAAU,OAAiB;CACzB,CAAM,EAAN,IAAA,OAAA;CAAA,CACU,EAAC,IAAX,SADA;CAJF,OAGA;CAHA,GAQC,EAAD,GAAU,UAAoB;CAE5B,CAAM,EAAN,GAAA,CAAA;CAAA,CACM,EAAN,IAAA,eADA;CAVF,OAQA;CAMC,EAA4B,CAA5B,KAAS,IAAV,EAAA;CAhBF,IAAY;;CAAZ,EAoBmB,MAAC,QAApB;CACE,CAAA,QAAA;CAAA,GAAiB,CAAkB,CAAnC,GAA0B,GAA1B;CAAA,CAAA,aAAO;QAAP;CAAA,CACA,CAAK,CAA2B,CAAZ,CAApB,CAAkD,EAApC;aACd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,GAAA,WAAO;QART;CAAA,CAeE,CAJa,CAAC,CAGF,CAHd,CAKE,EALuB,EAGoC,CAH7D,EAGc,CAHC,gCAA2B,CAOoB;CAlB9D,IAyBuB,CAAvB,IAAA;CACA,GAAG,CAAkC,CAArC,IAAA,EAAmB,QAAhB;CAID,GAAA,WAAO;QA9BT;CAgCA,GAAG,EAAH,4CAAA,MAAG;CAII,CAAyC,CAA1C,CAAA,CAAA,CAAA,CACsB,EADZ,CAAV,EAAA,GAAA,GAAA;MAJN,EAAA;CAWsB,CAAY,EAA5B,EAAA,GAAA,CAAA,CAAA,CAAA,GAAA;QA5CiB;CAjCzB,IAiCyB;;CAjCzB;;CAFuC,QAAS;CArBlD"}
\ No newline at end of file \ No newline at end of file
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