File tree Expand file tree Collapse file tree 3 files changed +3
-20
lines changed Expand file tree Collapse file tree 3 files changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export enum ModelType {
20
20
TEXT_NODE = 'text-node' ,
21
21
ELLIPSE_NODE = 'ellipse-node' ,
22
22
DIAMOND_NODE = 'diamond-node' ,
23
+ HTML_NODE = 'html-node' ,
23
24
EDGE = 'edge' ,
24
25
LINE_EDGE = 'line-edge' ,
25
26
POLYLINE_EDGE = 'polyline-edge' ,
Original file line number Diff line number Diff line change 1
- import { computed , observable } from 'mobx' ;
1
+ import { computed } from 'mobx' ;
2
2
import { Point } from '../../type' ;
3
3
import BaseNodeModel from './BaseNodeModel' ;
4
4
import { ModelType } from '../../constant/constant' ;
5
5
import GraphModel from '../GraphModel' ;
6
- import { defaultTheme } from '../../constant/DefaultTheme' ;
7
6
8
7
class HtmlNodeModel extends BaseNodeModel {
9
- modelType = ModelType . RECT_NODE ;
10
- @observable radius = defaultTheme . rect . radius ;
8
+ modelType = ModelType . HTML_NODE ;
11
9
12
10
constructor ( data , graphModel : GraphModel ) {
13
11
super ( data , graphModel , 'html' ) ;
Original file line number Diff line number Diff line change @@ -19,22 +19,6 @@ export default class HtmlNode extends BaseNode {
19
19
get rootEl ( ) {
20
20
return document . querySelector ( `#${ this . rootElId } ` ) as HTMLElement ;
21
21
}
22
- getShapeStyle ( ) {
23
- const attributes = super . getShapeStyle ( ) ;
24
- const { model : { radius } } = this . props as IProps ;
25
- return {
26
- ...attributes ,
27
- radius,
28
- } ;
29
- }
30
- getAttributes ( ) {
31
- const attributes = super . getAttributes ( ) ;
32
- const style = this . getShapeStyle ( ) ;
33
- return {
34
- ...attributes ,
35
- ...style ,
36
- } ;
37
- }
38
22
setHtml ( rootEl : HTMLElement ) {
39
23
rootEl . appendChild ( document . createElement ( 'div' ) ) ;
40
24
}
You can’t perform that action at this time.
0 commit comments