Skip to content

Commit

Permalink
fix: resovle build error
Browse files Browse the repository at this point in the history
  • Loading branch information
openwayne authored and Yanyan-Wang committed May 21, 2021
1 parent 23c55ff commit 7e469c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 33 deletions.
27 changes: 0 additions & 27 deletions packages/mobile/src/interface/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,30 +123,3 @@ export interface ITreeGraph extends IGraph {
*/
isLayoutAnimating: () => boolean;
}

export class G6GraphEvent extends GraphEvent implements IG6GraphEvent {
public item: Item;

public canvasX: number;

public canvasY: number;

public clientX: number;

public clientY: number;

public wheelDelta: number;

public detail: number;

public target!: IShapeBase & ICanvas;

constructor(type: string, event: IG6GraphEvent) {
super(type, event);
this.item = event.item;
this.canvasX = event.canvasX;
this.canvasY = event.canvasY;
this.wheelDelta = event.wheelDelta;
this.detail = event.detail;
}
}
4 changes: 1 addition & 3 deletions packages/mobile/src/stories/Basic.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import React, { useEffect } from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import G6 from '../../src';
import GridLayout from '../extends/layout/gridLayout';
import './basic.css';
Expand Down Expand Up @@ -36,7 +34,7 @@ export const BasicDemo = () => {
useEffect(() => {
if (!graph) {
graph = new G6.Graph({
container: ReactDOM.findDOMNode(ref.current),
container: ref.current,
width: 500,
height: 500,
layout: {
Expand Down
5 changes: 2 additions & 3 deletions packages/mobile/src/stories/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React from 'react';
// also exported from '@storybook/react' if you can deal with breaking changes in 6.1
import { Story, Meta } from '@storybook/react/types-6-0';

import { BasicDemo, BasicProps } from './Basic';

export default {
title: 'Example/basic-demo',
component: BasicDemo,
} as Meta;
};

const Template: Story<BasicProps> = (args) => <BasicDemo {...args} />;
const Template = (args) => <BasicDemo {...args} />;

export const MobileBasicDemo = Template.bind({});
MobileBasicDemo.args = {};

0 comments on commit 7e469c5

Please sign in to comment.