mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-23 09:20:03 +02:00
1064- Add click functionality to class diagrams
modified interaction functionality from flowcharts to work with class diagrams
This commit is contained in:
@@ -21,6 +21,9 @@
|
||||
|
||||
|
||||
"class" return 'CLASS';
|
||||
//"click" return 'CLICK';
|
||||
"callback" return 'CALLBACK';
|
||||
"link" return 'LINK';
|
||||
"<<" return 'ANNOTATION_START';
|
||||
">>" return 'ANNOTATION_END';
|
||||
[~] this.begin("generic");
|
||||
@@ -149,6 +152,7 @@ statement
|
||||
| classStatement
|
||||
| methodStatement
|
||||
| annotationStatement
|
||||
| clickStatement
|
||||
;
|
||||
|
||||
classStatement
|
||||
@@ -198,6 +202,13 @@ lineType
|
||||
| DOTTED_LINE {$$=yy.lineType.DOTTED_LINE;}
|
||||
;
|
||||
|
||||
clickStatement
|
||||
: CALLBACK className STR {$$ = $1;yy.setClickEvent($2, $3, undefined);}
|
||||
| CALLBACK className STR STR {$$ = $1;yy.setClickEvent($2, $3, $4);}
|
||||
| LINK className STR {$$ = $1;yy.setLink($2, $3, undefined);}
|
||||
| LINK className STR STR {$$ = $1;yy.setLink($2, $3, $4);}
|
||||
;
|
||||
|
||||
commentToken : textToken | graphCodeTokens ;
|
||||
|
||||
textToken : textNoTagsToken | TAGSTART | TAGEND | '==' | '--' | PCT | DEFAULT;
|
||||
|
Reference in New Issue
Block a user