Skip to content

Commit

Permalink
Release (#1465)
Browse files Browse the repository at this point in the history
* chore(release): bump version (#1461)

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

* fix: support multiple canvases in one container (#1462)

* fix: support multiple canvases in one container

* chore: commit changeset

* chore: remove console.log

* chore: add testcases for multiple-canvases-in-one-container

* chore(release): bump version (#1463)

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 8, 2023
1 parent 3856560 commit ede635a
Show file tree
Hide file tree
Showing 110 changed files with 1,066 additions and 67 deletions.
9 changes: 0 additions & 9 deletions .changeset/five-rules-shop.md

This file was deleted.

43 changes: 43 additions & 0 deletions __tests__/unit/canvas.multiple-canvases-in-one-container.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { Canvas } from '../../packages/g/src';
import { Renderer as CanvasRenderer } from '../../packages/g-canvas/src';

const $container = document.createElement('div');
$container.id = 'container';
document.body.prepend($container);

const renderer = new CanvasRenderer();

// create a canvas
const canvas1 = new Canvas({
container: 'container',
width: 600,
height: 500,
renderer,
supportsMutipleCanvasesInOneContainer: true,
});
const canvas2 = new Canvas({
container: 'container',
width: 600,
height: 500,
renderer,
supportsMutipleCanvasesInOneContainer: true,
});

describe('Canvas', () => {
afterEach(() => {
canvas1.destroyChildren();
canvas2.destroyChildren();
});

afterAll(() => {
canvas1.destroy();
canvas2.destroy();
});

it('should contain multiple canvases in the same container', async () => {
await canvas1.ready;
await canvas2.ready;

expect($container.childNodes.length).toBe(2);
});
});
14 changes: 14 additions & 0 deletions packages/g-camera-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @antv/g-camera-api

## 1.2.10

### Patch Changes

- Updated dependencies [414d08d9]
- @antv/g-lite@1.2.10

## 1.2.9

### Patch Changes

- Updated dependencies [3856560c]
- @antv/g-lite@1.2.9

## 1.2.8

### 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": "1.2.8",
"version": "1.2.10",
"description": "A simple implementation of Camera API.",
"keywords": [
"antv",
Expand Down
26 changes: 26 additions & 0 deletions packages/g-canvas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# @antv/g-canvas

## 1.11.11

### Patch Changes

- Updated dependencies [414d08d9]
- @antv/g-plugin-canvas-renderer@1.9.10
- @antv/g-lite@1.2.10
- @antv/g-plugin-canvas-picker@1.10.10
- @antv/g-plugin-canvas-path-generator@1.3.10
- @antv/g-plugin-dom-interaction@1.9.10
- @antv/g-plugin-html-renderer@1.9.11
- @antv/g-plugin-image-loader@1.3.10

## 1.11.10

### Patch Changes

- Updated dependencies [3856560c]
- @antv/g-lite@1.2.9
- @antv/g-plugin-canvas-path-generator@1.3.9
- @antv/g-plugin-canvas-picker@1.10.9
- @antv/g-plugin-canvas-renderer@1.9.9
- @antv/g-plugin-dom-interaction@1.9.9
- @antv/g-plugin-html-renderer@1.9.10
- @antv/g-plugin-image-loader@1.3.9

## 1.11.9

### 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": "1.11.9",
"version": "1.11.11",
"description": "A renderer implemented by Canvas 2D API",
"keywords": [
"antv",
Expand Down
26 changes: 26 additions & 0 deletions packages/g-canvaskit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# @antv/g-canvaskit

## 0.10.11

### Patch Changes

- Updated dependencies [414d08d9]
- @antv/g-lite@1.2.10
- @antv/g-plugin-canvas-picker@1.10.10
- @antv/g-plugin-canvas-path-generator@1.3.10
- @antv/g-plugin-canvaskit-renderer@1.3.10
- @antv/g-plugin-dom-interaction@1.9.10
- @antv/g-plugin-html-renderer@1.9.11
- @antv/g-plugin-image-loader@1.3.10

## 0.10.10

### Patch Changes

- Updated dependencies [3856560c]
- @antv/g-lite@1.2.9
- @antv/g-plugin-canvas-path-generator@1.3.9
- @antv/g-plugin-canvas-picker@1.10.9
- @antv/g-plugin-canvaskit-renderer@1.3.9
- @antv/g-plugin-dom-interaction@1.9.9
- @antv/g-plugin-html-renderer@1.9.10
- @antv/g-plugin-image-loader@1.3.9

## 0.10.9

### 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": "0.10.9",
"version": "0.10.11",
"description": "A renderer implemented by CanvasKit",
"keywords": [
"antv",
Expand Down
14 changes: 14 additions & 0 deletions packages/g-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @antv/g-components

## 1.9.10

### Patch Changes

- Updated dependencies [414d08d9]
- @antv/g-lite@1.2.10

## 1.9.9

### Patch Changes

- Updated dependencies [3856560c]
- @antv/g-lite@1.2.9

## 1.9.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": "1.9.8",
"version": "1.9.10",
"description": "Components for g",
"keywords": [
"antv",
Expand Down
14 changes: 14 additions & 0 deletions packages/g-dom-mutation-observer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @antv/g-dom-mutation-observer-api

## 1.2.10

### Patch Changes

- Updated dependencies [414d08d9]
- @antv/g-lite@1.2.10

## 1.2.9

### Patch Changes

- Updated dependencies [3856560c]
- @antv/g-lite@1.2.9

## 1.2.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": "1.2.8",
"version": "1.2.10",
"description": "A simple implementation of DOM MutationObserver API.",
"keywords": [
"antv",
Expand Down
14 changes: 14 additions & 0 deletions packages/g-gesture/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @antv/g-gesture

## 2.2.12

### Patch Changes

- Updated dependencies [414d08d9]
- @antv/g-lite@1.2.10

## 2.2.11

### Patch Changes

- Updated dependencies [3856560c]
- @antv/g-lite@1.2.9

## 2.2.10

### 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": "2.2.10",
"version": "2.2.12",
"description": "G Gesture",
"keywords": [
"antv",
Expand Down
14 changes: 14 additions & 0 deletions packages/g-image-exporter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @antv/g-image-exporter

## 0.7.10

### Patch Changes

- Updated dependencies [414d08d9]
- @antv/g-lite@1.2.10

## 0.7.9

### Patch Changes

- Updated dependencies [3856560c]
- @antv/g-lite@1.2.9

## 0.7.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": "0.7.8",
"version": "0.7.10",
"description": "A image exporter for G using DOM API",
"keywords": [
"antv",
Expand Down
12 changes: 12 additions & 0 deletions packages/g-lite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @antv/g-lite

## 1.2.10

### Patch Changes

- 414d08d9: Support multiple canvases in one container.

## 1.2.9

### Patch Changes

- 3856560c: Fix points type in Polyline & Polygon.

## 1.2.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": "1.2.8",
"version": "1.2.10",
"description": "A core module for rendering engine implements DOM API.",
"keywords": [
"antv",
Expand Down
5 changes: 4 additions & 1 deletion packages/g-lite/src/Canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,16 @@ export class Canvas extends EventTarget implements ICanvas {
supportsPointerEvents,
supportsTouchEvents,
supportsCSSTransform,
supportsMutipleCanvasesInOneContainer,
useNativeClickEvent,
alwaysTriggerPointerEventOnCanvas,
isTouchEvent,
isMouseEvent,
} = config;

cleanExistedCanvas(container, this);
if (!supportsMutipleCanvasesInOneContainer) {
cleanExistedCanvas(container, this);
}

let canvasWidth = width;
let canvasHeight = height;
Expand Down
5 changes: 5 additions & 0 deletions packages/g-lite/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,11 @@ export interface CanvasConfig {
*/
supportsCSSTransform?: boolean;

/**
* One container can have multiple canvases inside.
*/
supportsMutipleCanvasesInOneContainer?: boolean;

/**
* 画布宽度
*/
Expand Down
14 changes: 14 additions & 0 deletions packages/g-lottie-player/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @antv/g-lottie-player

## 0.2.10

### Patch Changes

- Updated dependencies [414d08d9]
- @antv/g-lite@1.2.10

## 0.2.9

### Patch Changes

- Updated dependencies [3856560c]
- @antv/g-lite@1.2.9

## 0.2.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-lottie-player/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-lottie-player",
"version": "0.2.8",
"version": "0.2.10",
"description": "A lottie player for G",
"keywords": [
"antv",
Expand Down
14 changes: 14 additions & 0 deletions packages/g-mobile-canvas-element/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @antv/g-mobile-canvas-element

## 0.8.10

### Patch Changes

- Updated dependencies [414d08d9]
- @antv/g-lite@1.2.10

## 0.8.9

### Patch Changes

- Updated dependencies [3856560c]
- @antv/g-lite@1.2.9

## 0.8.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-mobile-canvas-element/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-mobile-canvas-element",
"version": "0.8.8",
"version": "0.8.10",
"description": "Create a CanvasLike element from existed context in mobile environment",
"keywords": [
"antv",
Expand Down
Loading

0 comments on commit ede635a

Please sign in to comment.