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
Pranam Lashkari 2024-04-09 17:21:33 +01:00 committed by Pranam Lashkari
parent 94fed86c35
commit 17a1db2005
5 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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');

View File

@ -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;

View File

@ -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);

View File

@ -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]);