[annotator-dev] changing the position of annotator viewer/editor

Shauna Gordon-McKeon shaunagm at gmail.com
Tue Mar 3 15:31:41 UTC 2015


Hello again,

I want the annotator's editor and viewer to appear in the margin of a page,
rather than directly over the annotator's text.  I know there is currently
a plugin to do this (<
https://github.com/habeanf/annotator/blob/master/src/plugin/marginviewer.coffee>)
but it is 300+ lines of uncommented/undocumented code in a language I don't
know, so I'm going to try to make this myself.

Looking through the code, this seems to be the spot where the position of
the viewer is being defined: <
https://github.com/openannotation/annotator/blob/master/src/ui/viewer.js#L359>.


A few questions:

- Is this code in the latest release of annotator?  (I tried to check this
for myself, but was stymied by unfamiliarity with coffeescript. I found a
lot of tools for translating javascript to coffeescript, but not vice
versa.  If anyone has recommendations for such a tool, that'd be great too.)

- If this is in the latest release, is there a way to access/adapt this via
plugin, or is it finally time to learn how your development process works?
;)

Once I figure out where to make my changes, I think this should be fairly
straightforward - I want to keep Y as it is, and X can be calculated by the
offset of the marginal column from the document.

Thanks,
Shauna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20150303/ca987e19/attachment-0002.html>


More information about the annotator-dev mailing list