digirati-annotation-redux
Advanced tools
Comparing version 0.2.15-alpha.be61f365 to 0.2.15-alpha.cba8b036
@@ -12,3 +12,3 @@ import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; | ||
function AnnotationSelector(id, format, language, processingLanguage, textDirection, selector) { | ||
function AnnotationSelector(id, format, language, processingLanguage, textDirection, scale, selector) { | ||
_classCallCheck(this, AnnotationSelector); | ||
@@ -28,6 +28,8 @@ | ||
this.textDirection = textDirection; | ||
this.target = AnnotationSelector.parseTarget(id, 1, selector); | ||
this.target = AnnotationSelector.parseTarget(id, scale, selector); | ||
} | ||
AnnotationSelector.parse = function parse(text) { | ||
var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; | ||
if (!text) { | ||
@@ -39,3 +41,3 @@ return null; | ||
if (text.id) { | ||
return new AnnotationSelector(text.id, text.format, text.language, text.processingLanguage, text.textDirection); | ||
return new AnnotationSelector(text.id, text.format, text.language, text.processingLanguage, text.textDirection, scale); | ||
} | ||
@@ -45,3 +47,3 @@ | ||
if (text.source) { | ||
return new AnnotationSelector(text.source, text.format, text.language, text.processingLanguage, text.textDirection, text.selector); | ||
return new AnnotationSelector(text.source, text.format, text.language, text.processingLanguage, text.textDirection, scale, text.selector); | ||
} | ||
@@ -48,0 +50,0 @@ |
@@ -21,3 +21,3 @@ 'use strict'; | ||
function AnnotationSelector(id, format, language, processingLanguage, textDirection, selector) { | ||
function AnnotationSelector(id, format, language, processingLanguage, textDirection, scale, selector) { | ||
(0, _classCallCheck3.default)(this, AnnotationSelector); | ||
@@ -37,6 +37,8 @@ | ||
this.textDirection = textDirection; | ||
this.target = AnnotationSelector.parseTarget(id, 1, selector); | ||
this.target = AnnotationSelector.parseTarget(id, scale, selector); | ||
} | ||
AnnotationSelector.parse = function parse(text) { | ||
var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; | ||
if (!text) { | ||
@@ -48,3 +50,3 @@ return null; | ||
if (text.id) { | ||
return new AnnotationSelector(text.id, text.format, text.language, text.processingLanguage, text.textDirection); | ||
return new AnnotationSelector(text.id, text.format, text.language, text.processingLanguage, text.textDirection, scale); | ||
} | ||
@@ -54,3 +56,3 @@ | ||
if (text.source) { | ||
return new AnnotationSelector(text.source, text.format, text.language, text.processingLanguage, text.textDirection, text.selector); | ||
return new AnnotationSelector(text.source, text.format, text.language, text.processingLanguage, text.textDirection, scale, text.selector); | ||
} | ||
@@ -57,0 +59,0 @@ |
{ | ||
"name": "digirati-annotation-redux", | ||
"version": "0.2.15-alpha.be61f365", | ||
"version": "0.2.15-alpha.cba8b036", | ||
"description": "Describe annotation-redux here", | ||
@@ -5,0 +5,0 @@ "main": "es/index.js", |
92881
2416