diff --git a/src/Camera.ts b/src/Camera.ts index 96810a67..8b1de710 100644 --- a/src/Camera.ts +++ b/src/Camera.ts @@ -44,23 +44,26 @@ export class Camera extends AnnotationBody { /** @returns full linear size of orthographic viewport in vertical direction. linear unit is Scene global unit of measure + + Name of this property was originally Height, has been changed + at this revision to ViewHeight: + See issues at https://github.com/IIIF/api/issues/2289 **/ - getHeight(): number | undefined + getViewHeight(): number | undefined { if (this.isOrthographicCamera){ - var value = this.getProperty("height"); + // the term viewHeight for the resource Type was suggested + // in https://github.com/IIIF/api/issues/2289#issuecomment-2161608587 + var value = this.getProperty("viewHeight"); if (value) return value; else return undefined; } else return undefined; } - get Height(): number | undefined {return this.getHeight();} - /** - Full angular size of perspective viewport in vertical direction. - Angular unit is degrees - **/ - get FieldOfView(): number | undefined { return this.getFieldOfView();} + get ViewHeight(): number | undefined {return this.getViewHeight();} + + /** * @return : if not null, is either a PointSelector, or an object * with an id matching the id of an Annotation instance. diff --git a/test/tests_3d/2_cameras/orthographic_camera_lookat_point.js b/test/tests_3d/2_cameras/orthographic_camera_lookat_point.js index 9247df43..1cf805e8 100644 --- a/test/tests_3d/2_cameras/orthographic_camera_lookat_point.js +++ b/test/tests_3d/2_cameras/orthographic_camera_lookat_point.js @@ -48,7 +48,7 @@ describe('orthographic_camera_lookat_point', function() { expect(camera.isCamera).to.equal(true); expect(camera.isPerspectiveCamera).to.not.be.ok; expect(camera.isModel).to.equal(false,"checking isModel=false"); - expect(camera.Height).to.equal(3.5); + expect(camera.ViewHeight).to.equal(3.5); let lookedAt = camera.LookAt; expect( lookedAt , "find the lookAt annotation.id?").to.exist;