File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 792792.column-width-handle : hover {
793793 background-color : # 4f99bd ;
794794}
795+
796+ .help-link {
797+ border : 1px solid # 0278a4 ;
798+ padding-inline : 0.3rem ;
799+ border-radius : 3px ;
800+ cursor : pointer;
801+ }
802+
803+ .dark .help-link {
804+ border : 1px solid # 00b9fd ;
805+ }
Original file line number Diff line number Diff line change 128128 < span class ="shameless-plug ">
129129 < span > Created using</ span >
130130 < a id ="github-link " target ="blank " href ="https://github.com/openscopeproject/InteractiveHtmlBom "> InteractiveHtmlBom</ a >
131+ < a target ="blank " title ="Mouse and keyboard help " href ="https://github.com/openscopeproject/InteractiveHtmlBom/wiki/Usage#bom-page-mouse-actions " style ="text-decoration: none; "> < label class ="help-link "> ?</ label > </ a >
131132 </ span >
132133 </ label >
133134 </ div >
Original file line number Diff line number Diff line change @@ -1099,6 +1099,10 @@ function updateCheckboxStats(checkbox) {
10991099 td . lastChild . innerHTML = checked + "/" + total + " (" + Math . round ( percent ) + "%)" ;
11001100}
11011101
1102+ function constrain ( number , min , max ) {
1103+ return Math . min ( Math . max ( parseInt ( number ) , min ) , max ) ;
1104+ }
1105+
11021106document . onkeydown = function ( e ) {
11031107 switch ( e . key ) {
11041108 case "n" :
@@ -1119,6 +1123,23 @@ document.onkeydown = function (e) {
11191123 highlightNextRow ( ) ;
11201124 e . preventDefault ( ) ;
11211125 break ;
1126+ case "ArrowLeft" :
1127+ case "ArrowRight" :
1128+ if ( document . activeElement . type != "text" ) {
1129+ e . preventDefault ( ) ;
1130+ let boardRotationElement = document . getElementById ( "boardRotation" )
1131+ settings . boardRotation = parseInt ( boardRotationElement . value ) ; // degrees / 5
1132+ if ( e . key == "ArrowLeft" ) {
1133+ settings . boardRotation += 3 ; // 15 degrees
1134+ }
1135+ else {
1136+ settings . boardRotation -= 3 ;
1137+ }
1138+ settings . boardRotation = constrain ( settings . boardRotation , boardRotationElement . min , boardRotationElement . max ) ;
1139+ boardRotationElement . value = settings . boardRotation
1140+ setBoardRotation ( settings . boardRotation ) ;
1141+ }
1142+ break ;
11221143 default :
11231144 break ;
11241145 }
You can’t perform that action at this time.
0 commit comments