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
i i i i i i i e } m m m m m m m x ) p p p p p p p V p b ) e } o } p ] r } s } ; o o o o o o o i o a , s , p , l , e , e , r r r r r r r t r s p } { } b e i l t e } u r { } s a } r o p t t t t t t t e t e r u x n o i s , g e o l , v p o : o b } : b } i c c a m b p ] i a n c } l i ' e e r { r f p { { p c d c u , u , l l M l d i u l , n c A a l v a @ r n t e s a k o e p e i o e r } s i l } r } s d u a u e z i u { } s t d m o i } e s t : : : d a t f g g n f r s l u m o , o l i , o , o : d t d r e l g , : ( d e s f : : e e c f h i l f a o s d t p l e i u d b e f f n l e o } u e c e : D d i n s } ) : e c c t } } s { ' f t r l o f i u c . : D t l x n r : : n i o a l x u , r { : h : e O n a e , [ , c B ( o o r { { t 4 i o f e b r g l e e i y u t p c t l r m u t t a g } c e ' p p s m t b } u ' u p n n y c i } c i } s d 4 n f m r U S o u t s n { r O p e u e { { r e m e p e p s l , e [ s [ j s t : e T u u ) s f n r s s C o f a f / e 4 e r o R y m r s v : u O r t m y N a : O r u s o r ' m ] s : i : O p i c l ) t i d o t t h { n c c f } c t c ' m 6 C o ' m L n a d . . t p n : a : a t p n t e b e r a , . x o [ D ( l o o ; o x l c e s ( o o o o c ( o : o ' o m f T c t e e G ' D t a p m s ' t a : t a a e p j _ ' { n ' O b d n a m - e e d d c t d n n r c c c i } n h e n , n s ' o i f n I d i i l f : e : M i l F l c a : s t , s l : u . t d o : s i e k e s G s M o o o f s R a a c r s f s f ' n P } / o i v T i r o : i : i o : { i s t c e : o i o e e p u s s m d m o e t o ( n n n a c o e w w o ( r o i r i @ p o a p n n . H s : n l t / [ r n l : : t t a s a r l n n r l t a . t o i e o l t v c s s s ( w o l m a a n e . l l c g v r d t f a e G U t s [ e r s ( ' a s [ e - r n t { d e d L t : u p s e D S f m S e f e o t t t s a n e o i i s r c e e / i o e h r c C I B ' t : ' U u r f e d : . N { ' d u d s - n ) o s g u y n i r o r . f i n t i s . v t t o r o . U i } t m : o k o T _ , r _ R e c s o . a R o e _ j a a : ' i t n v r c d S c l i l e s s d s a t o l e l ) d e R n e i p } m a n H P u { _ L , r ' r { . m e m , . _ s m { d j n - c . D e r S o l e a t r e t t l o f f e e r L d f j s a g f U A e t T i m , D O e a ' j - e ( a s s G = i m c t g e s c c s a s f e g d s s . { r T e r s e t f ' e i B G , e o n a l b s c : s f { w x t t I r o S a ( h f P t t . s . ( e . . l ! o o x o / s h r g . g _ E s P d t ' P j : t x i a a ' o r T p / t t ' l = i a P s i . l ' m r r o = r P . m p ' ' o l j ( P S t a e ) u l e ' ' l l f i , u H a = s a s M i f l t a s c o F o m m g = ( a h l ; ; m o s { A s t x m u c ' , R i e l i t f c = U t r t . o s a i e h t = F o g i / ( ( ( ' t t u b o G ? _ h . = d g t m e n s l i t > B h p c s i v t w l h i p ( l s d p ' ' E h m v g ' ' n E _ ( j > ' i . i a ( - o t f x u _ . a / s i a e o = a l y ` e r e a R E r ( l i i u ; ' S { / n s ] n k r c j a u e s r { P r t = D n i i f = w e F C s c m t e N r n ' t n r ; * e ' ( , ' e a t _ s s r r . d e A e h d i g n t t p a ( i o o h m O o e , e - l ? ' w , f , y d D t | - : r i ' G s . i a r o f a p i ) l p m h S . o E r w ' r ' , o s o O e j j f e r , E o r r w e f d f i t a t ) e i o i r r v N ; e ; ( U r ( r M s s s i a e S l e e a c i e s r l h t ( e v e c e e T p U a p R m p - ' t x x l ( d c ) v s c i t l m . o e . h f { s d e r D s d ' r R c r L a k r , s ) ' e s F t e o t t o e o r o s j . s r : d a i o ) o L t o _ ( t g o _ $ , s r i o { ( l o r s / e t ) o j . c r r l o c ( ' c m ' . t _ / c l r ' v r f y s a i o s P $ s c , v r { e ' ; e o . = p a , t | e y d e y s ( f r d d { n i t a { u h e i s . s c / = e t a o _ ( i ( . ) r c d i ( n a t s c y { ( g s / s k d = e i n / _ a s s d e s ) o i r d ( t h r c d i i _ . s e r o d s . t r t t i x t m r e e d ( , c e r i n n _ e _ m ' D n r j e g r ' s i a { ( c m i s P s o e s a g t n _ u e . . c s s s u ) t s t d d t o s r d a s p c t l e v m p [ j x t . c ; D t ( e e o S t c e t f t u D o s . s d e e s s p t i s d m m r r D P s h u i r i d u t B ' r ' n x x _ a u r e o o y c i a t } l o s r i t s A ] c d t _ t r , m / S D r t P l n i , r p _ S , / ? e ] i ) h e o s r i , h a y a v e u _ E i n ' n . \ , ' S r c r ) t . l e ' c t ' _ n ' c , j / d r c D , f ; h ' ) : d t , P d m i s s . ' e c i i ) $ ) e o f A e i e r x * u m D t r f l ; { ; t m r i i T x r s c ? \ t o i o ) i e d r o y l m H . a $ . f ' r ; l ) e u ' e p h d / j 8 , ) r e ; s e ) s s o t o ] s ' ; o ) t , , t : r m r , $ ) ' o ; P r ' t l - { / , s t a f { u , . ' r } r t o c m / , o ) } c d h r r t e e m t , , ' i } c e u r t i i a ) r ` e c r r a r m t a ; e ) : u e ) . a p i s c ; r . ; u d o o _ y t t s ' r o r n t n o r i ) l r t . e c r u v ; ) - . j s y e e ) r m s t ( . : , o e ' s a . } t t _ r . ) t a a : _ g ' ; r t . / s ) u i u ' * ) ; e o r m ' , n l i , = - ) r > f p ) a o l , d ( r u o _ { c g r m e i - o : n r c / o k t ' t s r ) a _ u t _ e : i / o * } n ' ) . ] ; ' e , , s . j s ' ) , 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.