daainternetmarketing.blogg.se

The gettysburg address copy
The gettysburg address copy




the gettysburg address copy

The one hitch, though, is that this involves placing a large SVG element directly on top of the page content, which, by default, will cover all of the underlying elements (shapes on the map, words in the text) and block them from receiving the cursor events that drive the rest of the UI - including, very problematically, the mouseleave event that garbage-collects old lines and prevents them from getting stuck on the screen. From a technical standpoint, this turns out to be quite easy - just get the pixel offsets for the element in the transcription and the vector annotation on the map (for the latter, OpenLayers does the heavy lifting with helpers like getViewPortPxFromLonLat, which maps spatial coordinates to document-space pixel pairs), and then draw a line connecting the two points. So, when the mouse passes over words in the transcription, lines are automatically drawn to the corresponding locations on the image and vice versa.

the gettysburg address copy

To chip away at this, I wrote a little sub-plugin for Neatline called WordLines, which automatically overlays a little visual guideline (under the hood, a d3-wrapped SVG element) on top of the page that connects each pair of words in the two viewports when the cursor hovers on either of the instantiations.

the gettysburg address copy

Your eyes tend to dart back and forth between the image and the text, and it’s easy to lose your place - how to reduce that cognitive friction? I’ve tinkered around with similar interfaces in the past, but this time I wanted to play around with different approaches to formalizing the connection between the digitally-typeset words in the text and the handwritten words in the manuscript. This is a project that I’ve been hacking away at for some time, but only found the time (and motivation) to get it polished up and out the door over the weekend - a digital edition of the “Nicolay copy” of the Gettysburg Address, with each of the ~250 words in the manuscript individually traced out in Neatline and wired up with a plain-text transcription of the text on the right side of the screen.






The gettysburg address copy