Overview

I enabled initial angle settings in the Mirador 4 plugin for rotating images at arbitrary angles.

The repository is here.

https://github.com/nakamura196/mirador-rotation-plugin

The demo page is here. You can rotate images with initial settings for angle and bounding box.

https://nakamura196.github.io/mirador-rotation-plugin/

Background

The following article explains this plugin.

However, there was an issue where initial angle values could not be provided.

As introduced in the following article, it appeared that Mirador 4’s standard functionality allows providing initial angle values.

Additionally, since the “mirador-image-tools” plugin had been changed from webpack to Vite, I decided to reflect this change in “mirador-rotation-plugin” as well.

https://github.com/ProjectMirador/mirador-image-tools

Publishing on GitHub Pages

For publishing on GitHub Pages, I modified the vite.config.js from “mirador-image-tools” as follows. This allows creating a directory for GitHub Pages deployment using npm run build:demo.

https://github.com/nakamura196/mirador-rotation-plugin/blob/main/vite.config.js

iiiiiiie}mmmmmmmx)pppppppVpb)e}o}p]r}s};oooooooioa,s,p,l,e,e,rrrrrrrtrsp}{}beilte}ur{}sa}ropttttttteteruxnois,geol,vpo:ob}:b}iccambp]ianc}li'eer{rfp{{pcdcu,u,llMldiul,ncAalva@rntesakoepeioer}sil}r}sduaueziu{}stdmoi}est:::datfggnfrslumo,oli,o,o:dtdrelg,:(desf::eecfhilfaosdtpleiudbeffnleo}uece:Ddins}):ecct}}s{'ftrlofiuc.:Dtlxnr::nioalxu,r{:h:eOnae,[,cB(oor{{t4iofebrgleeiyutpctlrmuttag}ce'ppsmtb}u'upnnyci}ci}sd4nfmrUSoutsn{rOpeue{{remepepsl,e[s[jst:eTuu)sfnrssCofaf/e4eroRymrsv:uOrtmyNa:Orusor'm]s:i:Opicl)tidotth{nccf}ctc'm6Co'mLnad..tpn:a:atpntebera,.xo[D(loo;oxlces(ooooc(o:o'omfTcteeG'Dtapms'ta:taaepj_'{n'Obdnam-eeddctdnnrccci}nhen,ns'oifnIdiilf:e:MilFlca:st,sl:u.tdo:siekesGsMooofsRaacrsfsf'nP}/oivTiro:i:io:{istce:oioeepussmdmoeto(nnnacoewwo(roiri@poapnn.Hs:nlt/[rnl::ttasarlnnrlta.toieoltvcsss(wolmaane.llcgvrdtfaeGUts[ers('as[e-rnt{dedLt:upseDSfmSefeotttsaneoiisrcee/ioehrcCIB't:'Uurfed:.N{'duds-n)osguyniror.fintis.vttoro.Ui}tm:okoT_,r_Recso.aRoe_jaa:'itnvrcdSclilessdsatolel)deRneip}manHPu{_L,r'r{.mem,._sm{djn-c.DerSoleatrettloffeerLdfjsagfUAetTim,DOea'j-e(assG=imctgesccsasfegdss.{rTersetf'eiBG,eonalbsc:sf{wxttIroSa(hfPtt.s.(e..l!ooxo/shrg.g_EsPdt'Pj:txiaa'orTp/tt'l=iaPsi.l'mrro=rP.mp''olj(PStae)ule''llfi,uHa=sasMifltascoFommg=(ahl;;mos{Astxmuc',Rielitfc=Utrt.osaieht=Fogi/((('ttuboG?_h.=dgtmenslit>Bhpcsivtwlhip(lsdp''Ehmvg''nE_(j>'i.ia(-otfxu_.a/siaeo=aly`ereaREr(liiu;'S{/ns]nkrcjauesr{Prt=Dniif=weFCscmteNrn'tnr;*e'(,'eat_ssrr.deAehdignttpa(ioohmOoe,e-l?'w,f,ydDt|-:ri'Gs.iarofapi)lpmhS.oErw'r',osoOejjfer,Eorrwefdfitat)eioirrvN;e;(Ur(rMsssiaeSleeaciesrlht(eveceeTpUapRmp-'txxl(dc)vscitlm.oe.hf{sderDsd'rRcrLakr,s)'esFteottoeorosj.sr:daio)oLto_(tgo_$,srio{(lors/et)oj.crrloc('cm'.t_/clr'vrfysaiosP$sc,vr{e';eo.=pa,t|eydeys(frdd{nita{uheis.sc/=etao_(i(.)rcdi(natscy{(gs/skd=ein/_assdes)oird(thrcdii_.serods.trttixtmreed(,cerinn_e_m'Dnrjegr'sia{(cmisPsoesagtn_ue..csssu)tstddtosrdaspctlevmp[jxt.c;Dt(eeoStcetftuDos.sdeessptisdmmrrDPshuiridutB'r'nxx_aureooyciat}losritsA]cdt_tr,m/SDrtPlni,rp_S,/?e]i)heosri,hayaveu_Ein'n.\,'Srcr)t.le'ct'_n'c,j/drcD,f;h'):dt,Pdmiss.'ecii)$)eofAeierx*umDtrfl;{;tmriiTxrsc?\toio)iedroylmH.a$.f'r;l)eu'ephd/j8,)re;se)ssoto]s';o)t,,t:rmr,$)'o;Pr'tl-{/,staf{u,.'r}rtocm/,o)}cdhrrteemt,,'i}ceurtiia)r`ecrrarmta;e):ue).apisc;r.;udoo_ytts'rorntnori)lrt.ecruv;)-.jsyee)rmst(.:,oe'sa.}tt_r.)taa:_g';rt./s)uiu'*);eorm',nli,=-)r>fp)aol,d(ruo_{cgrmei-o:nrc/okt'tsr)a_ut_e:i/o*}n').];'e,,s.js'),

Summary

We hope this is helpful for Mirador 4 plugin development.

Note that Mirador 4 is progressing toward React 19 support, and the plugin will also need to be updated for React 19 in the future.

https://github.com/ProjectMirador/mirador/releases/tag/v4.0.0-alpha.16

Once development of Mirador and the mirador-image-tools plugin advances, I would like to update this module for React 19 support as well.