Skip to content

Add 'get' canvas functions to ranges - #79

Closed
MImranAsghar wants to merge 4 commits into
IIIF-Commons:mainfrom
utlib:add-canvas-functions-to-ranges
Closed

Add 'get' canvas functions to ranges#79
MImranAsghar wants to merge 4 commits into
IIIF-Commons:mainfrom
utlib:add-canvas-functions-to-ranges

Conversation

@MImranAsghar

Copy link
Copy Markdown
  • Add getCanvases, getCanvasById, getCanvasByIndex functions for the range type

@stephenwf

Copy link
Copy Markdown
Member

I'm not sure why, but 3 tests appear to be failing now:

195 passing (2s)
  3 failing
  1) pres3 presentation 3 range has a canvas:
     TypeError: Cannot read property '__jsonld' of undefined
      at context.<anonymous> (test/tests/pres3.js:48:96)
  2) pres3 presentation 3 has an annotation body:
     TypeError: Cannot read property 'getContent' of undefined
      at context.<anonymous> (test/tests/pres3.js:54:26)
  3) pres3 presentation 3 has a label:
     TypeError: Cannot read property 'getLabel' of undefined
      at context.<anonymous> (test/tests/pres3.js:62:26)

@MImranAsghar

Copy link
Copy Markdown
Author

Ah interesting, looking into it 👍

@MImranAsghar
MImranAsghar force-pushed the add-canvas-functions-to-ranges branch from 53830e3 to 87399d8 Compare January 22, 2021 16:03
@MImranAsghar

Copy link
Copy Markdown
Author

Hi @stephenwf , fixed the tests

- Create getCanvases, getCanvasById, getCanvasByIndex functions for the range type
sequence to range as well
- Add test for getCanvasById range
... index to each canvas in range
@MImranAsghar
MImranAsghar force-pushed the add-canvas-functions-to-ranges branch from 87399d8 to 2bd289b Compare February 12, 2021 20:19
... ranges when getting canvases
@MImranAsghar
MImranAsghar force-pushed the add-canvas-functions-to-ranges branch from 2bd289b to 53a2e81 Compare February 12, 2021 20:28
@MImranAsghar

Copy link
Copy Markdown
Author

Hi @stephenwf , I was wondering if you got a chance to take a look at the changes. do you think this can be merged? 🤔

@stephenwf

Copy link
Copy Markdown
Member

Sorry yes I think so 👍 @edsilv ?

@jamesmisson
jamesmisson changed the base branch from master to main July 8, 2025 15:21
@marlo-longley

Copy link
Copy Markdown

Hello Manifesto team, we are auditing some older issues and wondering if this is still a candidate to be merged.
For example we are hoping to use it here: ProjectMirador/mirador#2949
Thank you for taking a look!

@demiankatz

Copy link
Copy Markdown
Contributor

Thanks for checking in, @marlo-longley. I haven't previously reviewed this one (at the time this was going on, I wasn't as active in this project), but I'm certainly open to giving it a closer look. It seems that there are some conflicts that need to be resolved, though, so the first question is how we get this in shape to be mergeable. Is @MImranAsghar still actively engaged with this? If not, should we close this PR and open a fresh one that somebody is able to maintain?

@marlo-longley

Copy link
Copy Markdown

@demiankatz thanks! Yes, I rebased this branch and put up a new PR here #181

@demiankatz

Copy link
Copy Markdown
Contributor

Great, I'll close this PR so we can focus on the new one. Thanks, @marlo-longley!

@demiankatz demiankatz closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants