-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
I added a behavio/u/r as suggested in the "anatomy of behaviors" document
"graphic": function(elt) {
let content = new Image();
content.src = this.rw(elt.getAttribute("url")); // "this" is the CETEI object.
if (elt.hasAttribute("width")) {
content.setAttribute("width",elt.getAttribute("width"));
}
if (elt.hasAttribute("height")) {
content.setAttribute("height",elt.getAttribute("height"));
}
return content;
},
The TEI document contains e.g. things like this:
<graphic url="http://commons.wikimedia.org/wiki/Special:FilePath/Gilbert%20Abbott%20%C3%A0%20Beckett.jpg" height="10%" width="10%"/>
but they are always displayed without any sort of scaling (I've also tried specifying a width in px or mm )
Metadata
Metadata
Assignees
Labels
No labels