annotation: fixed comments not inserted in calc
problem:
could not insert more than one comment in calc
regression from fcb6367
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I30b52569a48d5f1d0bb2a3fe9f6f6e7c6bd43c80
pull/8817/head
parent
94fed86c35
commit
17a1db2005
|
@ -1,6 +1,7 @@
|
|||
/// <reference path="./refs/globals.ts"/>
|
||||
/// <reference path="../src/geometry/Point.ts" />
|
||||
/// <reference path="../src/geometry/Bounds.ts" />
|
||||
/// <reference path="../src/core/geometry.ts" />
|
||||
|
||||
var assert = require('assert').strict;
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
/// <reference path="../src/geometry/Point.ts" />
|
||||
/// <reference path="../src/geometry/Bounds.ts" />
|
||||
/// <reference path="../src/layer/vector/CPointSet.ts" />
|
||||
/// <reference path="../src/core/geometry.ts" />
|
||||
|
||||
var assert = require('assert');
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/// <reference path="./refs/globals.ts"/>
|
||||
/// <reference path="./data/SheetGeometryTestData.ts" />
|
||||
/// <reference path="../src/core/geometry.ts" />
|
||||
|
||||
var assert = require('assert').strict;
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ export class Bounds {
|
|||
|
||||
var bounds: Bounds;
|
||||
var point: Point;
|
||||
if (Array.isArray(obj) || obj instanceof L.Point) {
|
||||
if (Array.isArray(obj) || obj instanceof L.Point || obj instanceof SimplePoint) {
|
||||
point = toPoint(<PointConvertable>obj);
|
||||
} else {
|
||||
bounds = Bounds.toBounds(obj);
|
||||
|
|
|
@ -170,6 +170,10 @@ export class Point {
|
|||
return x;
|
||||
}
|
||||
|
||||
if (x instanceof SimplePoint) {
|
||||
return new Point(x.x, x.y);
|
||||
}
|
||||
|
||||
if (Array.isArray(x)) {
|
||||
var arr = x as Array<number>;
|
||||
return new Point(arr[0], arr[1]);
|
||||
|
|
Loading…
Reference in New Issue