Skip to content

Commit

Permalink
Remove custom numeric input component (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmoebaChant authored Aug 24, 2024
1 parent 13431a5 commit e391ebd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 167 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/preset-env": "^7.23.3",
"@babel/preset-react": "^7.23.3",
"@babylonjs/core": "^7.11.2",
"@babylonjs/shared-ui-components": "^7.11.2",
"@babylonjs/core": "^7.22.3",
"@babylonjs/shared-ui-components": "^7.22.3",
"@types/jest": "~29.5.8",
"@types/jest-expect-message": "~1.1.0",
"@types/node": "^22.0.2",
Expand Down
10 changes: 4 additions & 6 deletions packages/editor/src/assets/styles/components/propertyTab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -620,22 +620,20 @@
}
}

.numericLine {
.numeric {
padding-left: $line-padding-left;
height: 30px;
display: grid;
grid-template-columns: 50% 50%;

.label {
.numeric-label {
grid-column: 1;
display: flex;
align-items: center;
}

.numericInput {
grid-column: 2;
display: flex;
align-items: center;
.numeric-input {
margin: 5px;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as react from "react";
import { LineContainerComponent } from "../../sharedComponents/lineContainerComponent.js";
import { FileButtonLine } from "@babylonjs/shared-ui-components/lines/fileButtonLineComponent.js";
import { NumericInput } from "@babylonjs/shared-ui-components/lines/numericInputComponent.js";
import { GeneralPropertyTabComponent } from "./genericNodePropertyComponent.js";
import { createImageTexture, type ConnectionPointType, type InputBlock } from "@babylonjs/smart-filters";
import type { IPropertyComponentProps } from "@babylonjs/shared-ui-components/nodeGraphSystem/interfaces/propertyComponentProps.js";
Expand All @@ -9,7 +10,7 @@ import type { GlobalState, TexturePreset } from "../../globalState.js";
import { OptionsLine } from "@babylonjs/shared-ui-components/lines/optionsLineComponent.js";
import type { IInspectableOptions } from "@babylonjs/core/Misc/iInspectable.js";
import { CheckBoxLineComponent } from "../../sharedComponents/checkBoxLineComponent.js";
import { NumericInputComponent } from "../../sharedComponents/numericInputComponent.js";

import type { Nullable } from "@babylonjs/core/types.js";
import { getTextureInputBlockEditorData } from "../getEditorData.js";

Expand Down Expand Up @@ -111,7 +112,7 @@ export class ImageSourcePropertyTabComponent extends react.Component<ImageSource
propertyName="flipY"
onValueChanged={() => this._loadImage()}
/>
<NumericInputComponent
<NumericInput
lockObject={(this.props.stateManager.data as GlobalState).lockObject}
label="AFL"
labelTooltip="anisotropicFilteringLevel"
Expand Down
149 changes: 0 additions & 149 deletions packages/editor/src/sharedComponents/numericInputComponent.tsx

This file was deleted.

0 comments on commit e391ebd

Please sign in to comment.