File tree Expand file tree Collapse file tree 4 files changed +15
-7
lines changed
core/src/lib/utils/feature-flags Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 1- import { FF_BITMASK , FF_SAMPLE_DATASETS } from "./flags" ;
2-
31const FEATURE_FLAGS = window . APP_SETTINGS ?. feature_flags || { } ;
42
53// TODO: remove the override + if statement once LSE and LSO start building
@@ -11,8 +9,6 @@ const FLAGS_OVERRIDE: Record<string, boolean> = {
119 //
1210 // Add your flags overrides as following:
1311 // [FF_FLAG_NAME]: boolean
14- [ FF_SAMPLE_DATASETS ] : true ,
15- [ FF_BITMASK ] : true ,
1612} ;
1713
1814/**
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import * as TagSettings from "./TagSettings";
1313import { IconClose } from "@humansignal/icons" ;
1414import { Checkbox , Toggle } from "@humansignal/ui" ;
1515import { FF_DEV_3873 , isFF } from "../../utils/feature-flags" ;
16+ import { ff } from "@humansignal/core" ;
1617
1718const HotkeysDescription = ( ) => {
1819 const columns = [
@@ -64,7 +65,10 @@ const HotkeysDescription = () => {
6465
6566const newUI = isFF ( FF_DEV_3873 ) ? { newUI : true } : { } ;
6667
67- const editorSettingsKeys = Object . keys ( EditorSettings ) ;
68+ const editorSettingsKeys = Object . keys ( EditorSettings ) . filter ( ( key ) => {
69+ const flag = EditorSettings [ key ] . flag ;
70+ return flag ? ff . isActive ( flag ) : true ;
71+ } ) ;
6872
6973if ( isFF ( FF_DEV_3873 ) ) {
7074 const enableTooltipsIndex = editorSettingsKeys . findIndex ( ( key ) => key === "enableTooltips" ) ;
Original file line number Diff line number Diff line change 1+ import { FF_BITMASK } from "@humansignal/core/lib/utils/feature-flags" ;
2+
13export default {
24 enableHotkeys : {
35 newUI : {
@@ -93,5 +95,6 @@ export default {
9395 description : "Enable inverted zoom direction" ,
9496 onChangeEvent : "toggleInvertedZoom" ,
9597 defaultValue : false ,
98+ flag : FF_BITMASK ,
9699 } ,
97100} ;
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import { ImageEntityMixin } from "./ImageEntityMixin";
3333import { ImageSelection } from "./ImageSelection" ;
3434import { RELATIVE_STAGE_HEIGHT , RELATIVE_STAGE_WIDTH , SNAP_TO_PIXEL_MODE } from "../../../components/ImageView/Image" ;
3535import MultiItemObjectBase from "../MultiItemObjectBase" ;
36+ import { FF_BITMASK } from "@humansignal/core/lib/utils/feature-flags" ;
3637
3738const IMAGE_PRELOAD_COUNT = 3 ;
3839const ZOOM_INTENSITY = 0.009 ;
@@ -966,8 +967,12 @@ const Model = types
966967 isEvent = false ,
967968 ) {
968969 if ( val ) {
969- const zoomScale = isEvent
970- ? self . getInertialZoom ( val )
970+ const zoomScale = ff . isActive ( FF_BITMASK )
971+ ? isEvent
972+ ? self . getInertialZoom ( val )
973+ : val > 0
974+ ? self . currentZoom * self . zoomBy
975+ : self . currentZoom / self . zoomBy
971976 : val > 0
972977 ? self . currentZoom * self . zoomBy
973978 : self . currentZoom / self . zoomBy ;
You can’t perform that action at this time.
0 commit comments