-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix issue with inversify error when nobind
- Loading branch information
Showing
9 changed files
with
108 additions
and
10 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
common/changes/@visactor/vrender-core/fix-inversify-optional_2025-01-27-04-55.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@visactor/vrender-core", | ||
"comment": "fix: fix issue with inversify error when nobind", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@visactor/vrender-core" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@visactor/vrender-kits/fix-inversify-optional_2025-01-27-04-55.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@visactor/vrender-kits", | ||
"comment": "fix: fix issue with inversify error when nobind", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@visactor/vrender-kits" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@visactor/vrender/fix-inversify-optional_2025-01-27-04-55.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@visactor/vrender", | ||
"comment": "fix: fix issue with inversify error when nobind", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@visactor/vrender" | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/vrender-core/src/common/inversify/annotation/optional.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Metadata } from '../meta-data'; | ||
import { OPTIONAL_TAG } from '../metadata_keys'; | ||
import { createTaggedDecorator } from './inject_base'; | ||
|
||
function optional() { | ||
return createTaggedDecorator(new Metadata(OPTIONAL_TAG, true)); | ||
} | ||
|
||
export { optional }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
packages/vrender/__tests__/browser/src/pages/anxu-picker.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { createStage, createRect, IGraphic, container } from '@visactor/vrender-core'; | ||
import { loadBrowserEnv, loadMathPicker, registerRect } from '@visactor/vrender-kits'; | ||
|
||
registerRect(); | ||
loadBrowserEnv(container); | ||
loadMathPicker(container); | ||
|
||
// container.load(roughModule); | ||
export const page = () => { | ||
const graphics: IGraphic[] = []; | ||
// graphics.push( | ||
// createRect({ | ||
// x: 100, | ||
// y: 100, | ||
// width: 20, | ||
// height: 100, | ||
// fill: colorPools[10], | ||
// stroke: [colorPools[0], colorPools[0], colorPools[0], colorPools[0]], | ||
// cornerRadius: 10, | ||
// lineWidth: 5 | ||
// }) | ||
// ); | ||
|
||
const rect = createRect({ | ||
x: 20, | ||
y: 20, | ||
width: 101.55555555555556, | ||
height: 30, | ||
cornerRadius: -4, | ||
background: | ||
'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzFfMTUxNjkpIj4KPHBhdGggZD0iTTEwIDIwQzE1LjUyMjggMjAgMjAgMTUuNTIyOCAyMCAxMEMyMCA0LjQ3NzE1IDE1LjUyMjggMCAxMCAwQzQuNDc3MTUgMCAwIDQuNDc3MTUgMCAxMEMwIDE1LjUyMjggNC40NzcxNSAyMCAxMCAyMFoiIGZpbGw9IiNGMEYwRjAiLz4KPHBhdGggZD0iTTIwIDkuOTk5OTZDMjAgNS43MDAzMSAxNy4yODYzIDIuMDM0ODggMTMuNDc4MyAwLjYyMTk0OFYxOS4zNzhDMTcuMjg2MyAxNy45NjUgMjAgMTQuMjk5NiAyMCA5Ljk5OTk2WiIgZmlsbD0iI0Q4MDAyNyIvPgo8cGF0aCBkPSJNMCA5Ljk5OTk2QzAgMTQuMjk5NiAyLjcxMzc1IDE3Ljk2NSA2LjUyMTc2IDE5LjM3OFYwLjYyMTk0OEMyLjcxMzc1IDIuMDM0ODggMCA1LjcwMDMxIDAgOS45OTk5NloiIGZpbGw9IiM2REE1NDQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xXzE1MTY5Ij4KPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=', | ||
fill: 'rgba(0,0,0,0.3)', | ||
backgroundMode: 'repeat-x', | ||
boundsPadding: [2, 2, 2, 2], | ||
pickMode: 'imprecise' | ||
}); | ||
|
||
rect.addEventListener('click', () => { | ||
console.log('click'); | ||
}); | ||
|
||
const stage = createStage({ | ||
canvas: 'main', | ||
autoRender: true | ||
}); | ||
stage.defaultLayer.add(rect); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters