Skip to content

Commit

Permalink
Release (#1765)
Browse files Browse the repository at this point in the history
* chore: add preview demo npm script

* fix: `path` elements are drawn incorrectly (#1761)

* fix: `path` elements are drawn incorrectly after using `markerStartOffset` (#1760)

* chore: revert package.json

* fix: html element's `getBounds` logic exception (#1743) (#1764)

* Version Packages (#1762)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 30, 2024
1 parent 17c7b56 commit 910c58e
Show file tree
Hide file tree
Showing 104 changed files with 618 additions and 102 deletions.
File renamed without changes.
29 changes: 21 additions & 8 deletions demo/camera+html.html → demo/issues/issue-1743.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@
padding: 0;
}

html,
body {
height: 100vh;
padding: 111px 0 0 111px;
/* padding: 100px 0 0 100px; */
}

#container {
/* border: 1px solid #ddd; */
background-color: #ddd;
width: 100%;
height: 100%;
}
Expand All @@ -29,16 +32,14 @@
<body>
<div id="container"></div>
<script
src="../packages/g/dist/index.umd.min.js"
src="../../packages/g/dist/index.umd.min.js"
type="application/javascript"
></script>
<script
src="../packages/g-canvas/dist/index.umd.min.js"
src="../../packages/g-canvas/dist/index.umd.min.js"
type="application/javascript"
></script>
<script src="../packages/g-plugin-control/dist/index.umd.min.js"></script>
<!-- <script src="../packages/g-svg/dist/index.umd.min.js" type="application/javascript"></script>
<script src="../packages/g-webgl/dist/index.umd.min.js" type="application/javascript"></script> -->
<script src="../../packages/g-plugin-control/dist/index.umd.min.js"></script>
<script>
console.log(window.G);
const { Circle, CanvasEvent, Canvas, HTML } = window.G;
Expand All @@ -50,8 +51,8 @@
// create a canvas
const canvas = new Canvas({
container: 'container',
width: 800,
height: 800,
width: 600,
height: 600,
renderer: canvasRenderer,
});

Expand All @@ -61,6 +62,9 @@
cy: 200,
r: 50,
fill: 'red',
transform: 'translate(120px, 120px) scale(2)',
transformOrigin: 'center center',
// transformOrigin: '200px 200px',
},
});

Expand All @@ -72,13 +76,22 @@
height: 100,
innerHTML:
'<h1 style="width: 100px; height: 100px;">This is Title</h1>',
transform: 'translate(120px, 120px) scale(2)',
transformOrigin: 'center center',
// transformOrigin: '50px 50px',
},
});

canvas.addEventListener(CanvasEvent.READY, () => {
canvas.appendChild(circle);
canvas.appendChild(html);

// console.log(
// 'transform',
// circle.getWorldTransform(),
// html.getWorldTransform(),
// );

console.log('canvas.getCamera()', canvas.getCamera(), circle, html);
console.log(
'circle',
Expand Down
92 changes: 92 additions & 0 deletions demo/issues/issue-1760.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width,user-scalable=no,initial-scale=1,shrink-to-fit=no"
/>
<title>issue-1760</title>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}

html,
body {
height: 100vh;
}

#container {
width: 100%;
height: 100%;
}
</style>
</head>

<body>
<div id="container"></div>
<script
src="../../packages/g/dist/index.umd.min.js"
type="application/javascript"
></script>
<script
src="../../packages/g-canvas/dist/index.umd.min.js"
type="application/javascript"
></script>
<script type="module">
// @see https://github.com/antvis/G/issues/1760
const { Canvas, Path, Line, Canvas2D } = window.G;

const canvasRenderer = new Canvas2D.Renderer();

const canvas = new Canvas({
container: 'container',
width: 600,
height: 500,
renderer: canvasRenderer,
});

const arrowMarker = new Path({
style: {
d: 'M 10,10 L -10,0 L 10,-10 Z',
stroke: '#1890FF',
transformOrigin: 'center',
},
});

const path = new Path({
style: {
lineWidth: 1,
stroke: '#54BECC',
// d: 'M 0,40 L 100,100',
d: 'M 10,100 L 100,100',
markerStart: arrowMarker,
markerStartOffset: 30,
markerEnd: arrowMarker,
markerEndOffset: 30,
},
});

const line = new Line({
style: {
x1: 10,
y1: 150,
x2: 100,
y2: 150,
lineWidth: 1,
stroke: '#54BECC',
markerStart: arrowMarker,
markerStartOffset: 30,
markerEnd: arrowMarker,
markerEndOffset: 30,
},
});

canvas.appendChild(path);
canvas.appendChild(line);
</script>
</body>
</html>
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"author": "xiaoiver",
"scripts": {
"dev": "vite",
"demo": "http-server -c-1 -o ./demo/",
"build": "pnpm -r --sequential --if-present run build",
"bundle-viz": "cross-env BUNDLE_VIS=1 PACKAGE=g npm run build",
"contributor": "git-contributor",
Expand Down Expand Up @@ -73,13 +74,13 @@
"husky": "^7.0.4",
"is-ci": "2.0.0",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jest-matcher-deep-close-to": "^3.0.2",
"jsdom": "^19.0.0",
"lil-gui": "^0.16.0",
"limit-size": "^0.1.4",
"lint-staged": "^10.5.4",
"lil-gui": "^0.16.0",
"markdownlint-cli": "^0.32.2",
"npm-run-all": "^4.1.5",
"pixelmatch": "^5.3.0",
Expand All @@ -91,8 +92,8 @@
"rollup": "^3.29.4",
"rollup-plugin-polyfill-node": "^0.8.0",
"rollup-plugin-visualizer": "^5.9.2",
"sinon": "^11.1.2",
"simplex-noise": "^3.0.0",
"sinon": "^11.1.2",
"ts-jest": "^29.1.1",
"typescript": "^5.3.2",
"vite": "^3.2.7",
Expand Down
7 changes: 7 additions & 0 deletions packages/g-camera-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @antv/g-camera-api

## 2.0.12

### Patch Changes

- Updated dependencies [fcd04674]
- @antv/g-lite@2.0.9

## 2.0.11

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-camera-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-camera-api",
"version": "2.0.11",
"version": "2.0.12",
"description": "A simple implementation of Camera API.",
"keywords": [
"antv",
Expand Down
14 changes: 14 additions & 0 deletions packages/g-canvas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @antv/g-canvas

## 2.0.12

### Patch Changes

- Updated dependencies [fcd04674]
- Updated dependencies [5e4a1d69]
- @antv/g-plugin-html-renderer@2.0.11
- @antv/g-lite@2.0.9
- @antv/g-plugin-canvas-path-generator@2.0.9
- @antv/g-plugin-canvas-picker@2.0.10
- @antv/g-plugin-canvas-renderer@2.0.10
- @antv/g-plugin-dom-interaction@2.0.9
- @antv/g-plugin-image-loader@2.0.9

## 2.0.11

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-canvas",
"version": "2.0.11",
"version": "2.0.12",
"description": "A renderer implemented by Canvas 2D API",
"keywords": [
"antv",
Expand Down
14 changes: 14 additions & 0 deletions packages/g-canvaskit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @antv/g-canvaskit

## 1.0.12

### Patch Changes

- Updated dependencies [fcd04674]
- Updated dependencies [5e4a1d69]
- @antv/g-plugin-html-renderer@2.0.11
- @antv/g-lite@2.0.9
- @antv/g-plugin-canvas-path-generator@2.0.9
- @antv/g-plugin-canvas-picker@2.0.10
- @antv/g-plugin-canvaskit-renderer@2.0.10
- @antv/g-plugin-dom-interaction@2.0.9
- @antv/g-plugin-image-loader@2.0.9

## 1.0.11

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-canvaskit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-canvaskit",
"version": "1.0.11",
"version": "1.0.12",
"description": "A renderer implemented by CanvasKit",
"keywords": [
"antv",
Expand Down
7 changes: 7 additions & 0 deletions packages/g-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @antv/g-components

## 2.0.9

### Patch Changes

- Updated dependencies [fcd04674]
- @antv/g-lite@2.0.9

## 2.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-components",
"version": "2.0.8",
"version": "2.0.9",
"description": "Components for g",
"keywords": [
"antv",
Expand Down
7 changes: 7 additions & 0 deletions packages/g-dom-mutation-observer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @antv/g-dom-mutation-observer-api

## 2.0.9

### Patch Changes

- Updated dependencies [fcd04674]
- @antv/g-lite@2.0.9

## 2.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-dom-mutation-observer-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-dom-mutation-observer-api",
"version": "2.0.8",
"version": "2.0.9",
"description": "A simple implementation of DOM MutationObserver API.",
"keywords": [
"antv",
Expand Down
7 changes: 7 additions & 0 deletions packages/g-gesture/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @antv/g-gesture

## 3.0.9

### Patch Changes

- Updated dependencies [fcd04674]
- @antv/g-lite@2.0.9

## 3.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-gesture/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-gesture",
"version": "3.0.8",
"version": "3.0.9",
"description": "G Gesture",
"keywords": [
"antv",
Expand Down
7 changes: 7 additions & 0 deletions packages/g-image-exporter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @antv/g-image-exporter

## 1.0.9

### Patch Changes

- Updated dependencies [fcd04674]
- @antv/g-lite@2.0.9

## 1.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-image-exporter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-image-exporter",
"version": "1.0.8",
"version": "1.0.9",
"description": "A image exporter for G using DOM API",
"keywords": [
"antv",
Expand Down
6 changes: 6 additions & 0 deletions packages/g-lite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @antv/g-lite

## 2.0.9

### Patch Changes

- fcd04674: fix: html element's `getBounds` logic exception (#1743)

## 2.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-lite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-lite",
"version": "2.0.8",
"version": "2.0.9",
"description": "A core module for rendering engine implements DOM API.",
"keywords": [
"antv",
Expand Down
Loading

0 comments on commit 910c58e

Please sign in to comment.