Skip to content

Commit

Permalink
docs: refine demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanyan-Wang committed Mar 18, 2021
1 parent 683d36b commit cad77e2
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/site/examples/algorithm/algoDemos/demo/gaddi.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,14 @@ const patternGraph = new G6.Graph({
})
patternGraph.data(pattern);
patternGraph.render();
console.log(patternGraph.get('canvas'))
patternGraph.get('canvas').get('el').style.position = 'absolute';
patternGraph.get('canvas').get('el').style.top = '50px';
patternGraph.get('canvas').get('el').style.left = '15px';
patternGraph.get('canvas').get('el').style.backgroundColor = '#eee';
patternGraph.get('canvas').get('el').style.opacity = 0.7;
patternGraph.get('canvas').addShape('text', {
const patternCanvas = patternGraph.get('canvas');
const patternCanvasEl = patternCanvas.get('el');
patternCanvasEl.style.position = 'absolute';
patternCanvasEl.style.top = '50px';
patternCanvasEl.style.left = '15px';
patternCanvasEl.style.backgroundColor = '#eee';
patternCanvasEl.style.opacity = 0.7;
patternCanvas.addShape('text', {
attrs: {
text: 'Pattern',
x: patternGraphWidth - 55,
Expand Down

0 comments on commit cad77e2

Please sign in to comment.