@@ -498,7 +498,8 @@ ClassView.prototype.createClassInstance = function (name, classMetaData) {
498
498
keyWordsArray . push ( n ) ;
499
499
arr . push ( {
500
500
text : n ,
501
- icons : self . getPropertyIcons ( qrs [ n ] )
501
+ icons : self . getPropertyIcons ( qrs [ n ] ) ,
502
+ hover : qrs [ n ] [ "SqlQuery" ]
502
503
} ) ;
503
504
}
504
505
return arr ;
@@ -610,7 +611,7 @@ ClassView.prototype.confirmRender = function (data) {
610
611
uml = joint . shapes . uml , relFrom , relTo ,
611
612
classes = { } , connector ;
612
613
613
- console . log ( data ) ;
614
+ console . log ( data ) ; // todo
614
615
this . filterInherits ( data ) ;
615
616
616
617
// Reset view and zoom again because it may cause visual damage to icons.
@@ -700,6 +701,8 @@ ClassView.prototype.confirmRender = function (data) {
700
701
q . options . height / 2 - Math . min ( q . options . height / 2 - 100 , bb . height / 2 )
701
702
) ;
702
703
704
+ this . onRendered ( ) ;
705
+
703
706
} ;
704
707
705
708
ClassView . prototype . loadClass = function ( className ) {
@@ -947,4 +950,18 @@ ClassView.prototype.init = function () {
947
950
return w ;
948
951
} ) ( ) ;
949
952
953
+ } ;
954
+
955
+ ClassView . prototype . onRendered = function ( ) {
956
+
957
+ [ ] . slice . call ( document . querySelectorAll ( ".line-hoverable" ) ) . forEach ( function ( el ) {
958
+ var hm = new HoverMessage ( el . getAttribute ( "hovertext" ) ) ;
959
+ el . addEventListener ( "mouseover" , function ( e ) {
960
+ hm . attach ( e . pageX || e . clientX , e . pageY || e . clientY ) ;
961
+ } ) ;
962
+ //el.addEventListener("mouseout", function () {
963
+ // hm.detach();
964
+ //});
965
+ } ) ;
966
+
950
967
} ;
0 commit comments