Skip to content

Commit 7d76110

Browse files
committed
2 parents 0f11f10 + e3a813f commit 7d76110

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

web/libs/core/src/lib/utils/feature-flags/ff.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { FF_BITMASK, FF_SAMPLE_DATASETS } from "./flags";
2-
31
const 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
/**

web/libs/editor/src/components/Settings/Settings.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import * as TagSettings from "./TagSettings";
1313
import { IconClose } from "@humansignal/icons";
1414
import { Checkbox, Toggle } from "@humansignal/ui";
1515
import { FF_DEV_3873, isFF } from "../../utils/feature-flags";
16+
import { ff } from "@humansignal/core";
1617

1718
const HotkeysDescription = () => {
1819
const columns = [
@@ -64,7 +65,10 @@ const HotkeysDescription = () => {
6465

6566
const 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

6973
if (isFF(FF_DEV_3873)) {
7074
const enableTooltipsIndex = editorSettingsKeys.findIndex((key) => key === "enableTooltips");

web/libs/editor/src/core/settings/editorsettings.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { FF_BITMASK } from "@humansignal/core/lib/utils/feature-flags";
2+
13
export 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
};

web/libs/editor/src/tags/object/Image/Image.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { ImageEntityMixin } from "./ImageEntityMixin";
3333
import { ImageSelection } from "./ImageSelection";
3434
import { RELATIVE_STAGE_HEIGHT, RELATIVE_STAGE_WIDTH, SNAP_TO_PIXEL_MODE } from "../../../components/ImageView/Image";
3535
import MultiItemObjectBase from "../MultiItemObjectBase";
36+
import { FF_BITMASK } from "@humansignal/core/lib/utils/feature-flags";
3637

3738
const IMAGE_PRELOAD_COUNT = 3;
3839
const 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;

0 commit comments

Comments
 (0)