{"id":28298663,"url":"https://github.com/ubleipzig/mirador-ruler-plugin","last_synced_at":"2026-07-15T09:33:02.924Z","repository":{"id":71117679,"uuid":"198383056","full_name":"ubleipzig/mirador-ruler-plugin","owner":"ubleipzig","description":null,"archived":false,"fork":false,"pushed_at":"2019-08-12T15:42:00.000Z","size":39,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-26T07:06:59.180Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubleipzig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-23T08:07:01.000Z","updated_at":"2022-12-02T15:47:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"6047cfba-fc55-413e-945c-065de71cd1da","html_url":"https://github.com/ubleipzig/mirador-ruler-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ubleipzig/mirador-ruler-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubleipzig%2Fmirador-ruler-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubleipzig%2Fmirador-ruler-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubleipzig%2Fmirador-ruler-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubleipzig%2Fmirador-ruler-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubleipzig","download_url":"https://codeload.github.com/ubleipzig/mirador-ruler-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubleipzig%2Fmirador-ruler-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35499864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-15T02:00:06.706Z","response_time":131,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-23T06:14:27.398Z","updated_at":"2026-07-15T09:33:02.888Z","avatar_url":"https://github.com/ubleipzig.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Mirador 3 Ruler Plugin\n\nA plugin for Mirador 3 that adds a vertical and horizontal ruler, if a physical dimensions service is available for a given canvas. This plugin is an adaption of the [physical document ruler](https://github.com/dbmdz/mirador-plugins#physical-document-ruler) provided by morpheus87.\n\nContinous Deployment: [![Netlify Status](https://api.netlify.com/api/v1/badges/e8d24f01-4ec5-4ee8-a196-a9de862aa17f/deploy-status)](https://app.netlify.com/sites/agitated-turing-9ac6ed/deploys)\n\nMore information about Mirador's plugin system can be found here: [M3 Mirador 3 plugins](https://github.com/ProjectMirador/mirador/wiki/M3---Mirador-3-plugins, \"M3 plugins\")\n\n## Usage\n\nThe plugin provides a create method, you can use to instantiate the plugin, as shown below. Please notice that you also habe to pass the OSDReference plugin as well.\n\n```javascript\nclass Mirador extends React.Component {\n  constructor(props) {\n    super(props)\n    this.state = {}\n  }\n\n  render() {\n\n    const documentRuler = plugins.createPlugin({\n      color: '#ff0000'\n    });\n\n    return (\n      \u003cProvider store={this.state.store}\u003e\n        \u003cPluginProvider\n          plugins={[documentRuler, plugins.OsdReference]}\n          createRootReducer={createRootReducer}\n        \u003e\n          \u003cMiradorApp /\u003e\n        \u003c/PluginProvider\u003e\n      \u003c/Provider\u003e\n    )\n  }\n}\n\nconst el = document.createElement('div');\nel.setAttribute('id', 'mirador')\ndocument.body.appendChild(el);\n\nReactDOM.render(\n  \u003cMirador /\u003e,\n  document.getElementById('mirador')\n);\n```\n\nYou can use the following configuration attributes:\n\n| Configuration Key | Type | Description |\n| ----------------- | ---- | ----------- |\n| color | string | color for rulers and labels |\n| location | string | string | the ruler's origin |\n| smallDashSize | number | size of the small dashes in pixels |\n| largeDashSize | number | size of the large dashes in pixels |\n| labelsEvery | number | draw ruler labels every n centimeters/inches |\n| imperialUnits | boolean | Use imperial units instead of metric |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubleipzig%2Fmirador-ruler-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubleipzig%2Fmirador-ruler-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubleipzig%2Fmirador-ruler-plugin/lists"}