Skip to content

Commit

Permalink
Changed name of property Height to viewHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentmarchetti committed Jun 14, 2024
1 parent b5bc5c4 commit a82947c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions src/Camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a82947c

Please sign in to comment.