@@ -621,6 +621,12 @@ pub struct InteractiveHtmlBom {
621621 /// Dark mode on/off
622622 pub dark_mode : bool ,
623623
624+ /// Board drawings rotation \[°\]
625+ pub board_rotation : f32 ,
626+
627+ /// Whether to offset the back side rotation or not
628+ pub offset_back_rotation : bool ,
629+
624630 /// Silkscreen visibility
625631 pub show_silkscreen : bool ,
626632
@@ -718,6 +724,8 @@ impl InteractiveHtmlBom {
718724 view_mode : ViewMode :: LeftRight ,
719725 highlight_pin1 : HighlightPin1Mode :: None ,
720726 dark_mode : false ,
727+ board_rotation : 0.0 ,
728+ offset_back_rotation : false ,
721729 show_silkscreen : true ,
722730 show_fabrication : true ,
723731 show_pads : true ,
@@ -791,15 +799,15 @@ impl InteractiveHtmlBom {
791799 } ;
792800
793801 let config = object ! {
794- board_rotation: 0.0 ,
802+ board_rotation: ( self . board_rotation / 5.0 ) as i32 ,
795803 bom_view: self . view_mode. to_json( ) ,
796804 checkboxes: self . checkboxes. join( "," ) ,
797805 dark_mode: self . dark_mode,
798806 fields: self . fields. to_json( ) ,
799807 highlight_pin1: self . highlight_pin1. to_json( ) ,
800808 kicad_text_formatting: false ,
801809 layer_view: layer_view,
802- offset_back_rotation: false ,
810+ offset_back_rotation: self . offset_back_rotation ,
803811 redraw_on_drag: true ,
804812 show_fabrication: self . show_fabrication,
805813 show_pads: self . show_pads,
0 commit comments