digirati-annotation-redux
Advanced tools
Comparing version 0.2.15-alpha.8b4c1dcd to 0.2.15-alpha.9471dbb9
@@ -141,13 +141,2 @@ import _regeneratorRuntime from 'babel-runtime/regenerator'; | ||
AnnotationSelector.parse = function parse(text) { | ||
if (!text) { | ||
return null; | ||
} | ||
if (text.id) { | ||
return new AnnotationSelector(text.id, text.format, text.language, text.processingLanguage, text.textDirection); | ||
} | ||
// @todo check for is text or is object and construct accordingly. | ||
return new AnnotationSelector(text); | ||
}; | ||
function AnnotationSelector(id, format, language, processingLanguage, textDirection) { | ||
@@ -171,2 +160,14 @@ _classCallCheck(this, AnnotationSelector); | ||
AnnotationSelector.parse = function parse(text) { | ||
if (!text) { | ||
return null; | ||
} | ||
if (text.id) { | ||
return new AnnotationSelector(text.id, text.format, text.language, text.processingLanguage, text.textDirection); | ||
} | ||
// @todo check for is text or is object and construct accordingly. | ||
return new AnnotationSelector(text); | ||
}; | ||
AnnotationSelector.parseTarget = function parseTarget(source) { | ||
@@ -173,0 +174,0 @@ var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; |
@@ -271,13 +271,2 @@ 'use strict'; | ||
AnnotationSelector.parse = function parse(text) { | ||
if (!text) { | ||
return null; | ||
} | ||
if (text.id) { | ||
return new AnnotationSelector(text.id, text.format, text.language, text.processingLanguage, text.textDirection); | ||
} | ||
// @todo check for is text or is object and construct accordingly. | ||
return new AnnotationSelector(text); | ||
}; | ||
function AnnotationSelector(id, format, language, processingLanguage, textDirection) { | ||
@@ -301,2 +290,14 @@ (0, _classCallCheck3.default)(this, AnnotationSelector); | ||
AnnotationSelector.parse = function parse(text) { | ||
if (!text) { | ||
return null; | ||
} | ||
if (text.id) { | ||
return new AnnotationSelector(text.id, text.format, text.language, text.processingLanguage, text.textDirection); | ||
} | ||
// @todo check for is text or is object and construct accordingly. | ||
return new AnnotationSelector(text); | ||
}; | ||
AnnotationSelector.parseTarget = function parseTarget(source) { | ||
@@ -303,0 +304,0 @@ var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; |
{ | ||
"name": "digirati-annotation-redux", | ||
"version": "0.2.15-alpha.8b4c1dcd", | ||
"version": "0.2.15-alpha.9471dbb9", | ||
"description": "Describe annotation-redux here", | ||
@@ -5,0 +5,0 @@ "main": "es/index.js", |
91101