diff --git a/__tests__/demos/plugin/yoga-text.ts b/__tests__/demos/plugin/yoga-text.ts index 5f8bafedc..534c8c4f9 100644 --- a/__tests__/demos/plugin/yoga-text.ts +++ b/__tests__/demos/plugin/yoga-text.ts @@ -1,7 +1,9 @@ -import { Circle, Group, Rect, Text } from '../../../packages/g'; +import { runtime, Circle, Group, Rect, Text } from '../../../packages/g'; import { Plugin as PluginYoga } from '../../../packages/g-plugin-yoga'; export async function yogaText(context) { + runtime.enableCSSParsing = true; + const { canvas, gui } = context; await canvas.ready; diff --git a/packages/g-plugin-matterjs/src/MatterJSPlugin.ts b/packages/g-plugin-matterjs/src/MatterJSPlugin.ts index 1362eca51..5e8beb278 100644 --- a/packages/g-plugin-matterjs/src/MatterJSPlugin.ts +++ b/packages/g-plugin-matterjs/src/MatterJSPlugin.ts @@ -340,6 +340,7 @@ export class MatterJSPlugin implements RenderingPlugin { config, ); } else if (nodeName === Shape.CIRCLE) { + target.style.transformOrigin = 'center center'; // matter.js also use polygon inside body = Bodies.circle(0, 0, halfExtents[0], config); } else if (nodeName === Shape.ELLIPSE) { diff --git a/site/package.json b/site/package.json index 6077f8495..0ba4429d2 100644 --- a/site/package.json +++ b/site/package.json @@ -89,7 +89,7 @@ }, "devDependencies": { "@antv/dumi-theme-antv": "^0.5.1", - "dumi": "^2.2.1", + "dumi": "~2.2.1", "workerize-loader": "^2.0.2" } }