Skip to content

@height and @width on graphic ignored #71

@lb42

Description

@lb42

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions