Skip to content

Commit

Permalink
Merge pull request #411 from Kanaries/feat-painter-bug
Browse files Browse the repository at this point in the history
fix: painter bugs
  • Loading branch information
ObservedObserver authored Mar 27, 2024
2 parents 9777d60 + 2d9e4a6 commit d6200bf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/rath-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@fluentui/react-file-type-icons": "^8.8.3",
"@fluentui/react-hooks": "^8.6.11",
"@fluentui/react-icons": "^2.0.200",
"@kanaries/graphic-walker": "^0.4.47",
"@kanaries/graphic-walker": "^0.4.50",
"@kanaries/loa": "^0.0.16",
"@kanaries/web-data-loader": "0.1.7",
"@vercel/analytics": "^1.0.0",
Expand Down
1 change: 0 additions & 1 deletion packages/rath-client/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ h2, h3 {

.main-app-container{
display: flex;
overflow: auto;
position: fixed;
/* top: 60px; */
top:0px;
Expand Down
5 changes: 3 additions & 2 deletions packages/rath-client/src/pages/painter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const Painter: React.FC = (props) => {
}, 800), [painterStore])

const noViz = viewData.length === 0 || fieldMetas.length === 0 || vizSpec === null;
const axisResizable = painterMode === PAINTER_MODE.MOVE;
const painterSpec = useMemo<IVegaSubset | null>(() => {
if (!noViz) {
const mvd: any = {
Expand All @@ -140,7 +141,7 @@ const Painter: React.FC = (props) => {
domain: mutFeatValues,
},
};
if (painterMode === PAINTER_MODE.MOVE) {
if (axisResizable) {
if (!(mvd.params instanceof Array)) {
mvd.params = [];
}
Expand All @@ -153,7 +154,7 @@ const Painter: React.FC = (props) => {
return mvd;
}
return null;
}, [vizSpec, mutFeatValues, noViz, painterMode]);
}, [vizSpec, mutFeatValues, noViz, axisResizable]);
const [realPainterSize, setRealPainterSize] = useState(0);
useEffect(() => {
if (painterSpec !== null && container.current) {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3956,10 +3956,10 @@
dependencies:
localforage "^1.10.0"

"@kanaries/graphic-walker@^0.4.47":
version "0.4.47"
resolved "https://registry.yarnpkg.com/@kanaries/graphic-walker/-/graphic-walker-0.4.47.tgz#bf4f0a1396153ecd62e401d2bb5cc7c7eb5c57db"
integrity sha512-VPByjpsTFPoAaEqwX/L/cRM7ut5QtWYRSjec2j83T2hRULk1ntb8flGYgVB6zrHIwfHvrI3/puiF5Pq9X8917Q==
"@kanaries/graphic-walker@^0.4.50":
version "0.4.50"
resolved "https://registry.npmmirror.com/@kanaries/graphic-walker/-/graphic-walker-0.4.50.tgz#b117f41b8c16c3cca305d3280b28b0dcd3ebf4a3"
integrity sha512-KVwtsCgCQJbJ37GvEvk+JMIAaZPIdIUhoAtLwLtA7R59HslHwHCtvdByaJhhNvxRfydfn+BEpZ525JDd2sZflA==
dependencies:
"@headlessui-float/react" "^0.11.4"
"@headlessui/react" "1.7.12"
Expand Down

0 comments on commit d6200bf

Please sign in to comment.