charCoords and cursorCoords in CM6

Hi,

I am migrating a big codebase from CM5 to CM6. I am searching for the equivalent for charCoords and cursorCoords, I could not find anything similar in the doc, and the migration guide does not mention these two functions.

See coordsAtPos.

Thanks for your quick reply. If I understand correctly, this method is equivalent to charCoords with mode = page? Is there an easy way to have the same behavior as charCoords with local or window mode?

No, you’ll have to do the conversions yourself (but my current view is that multiple coordinate systems like that get very confusing and it’s usually better to just do your computations entirely in viewport coordinates).

Ok, thank you very much.