Skip to content

Commit

Permalink
Sequence Diagram Popup : Work _in_progress
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishjain0512 committed Oct 7, 2021
1 parent a06f6f9 commit 18ecf47
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/diagrams/sequence/svgDraw.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,20 @@ export const drawPopup = function (elem, actor, minMenuWidth, textAttrs, forceMe
displayValue = 'block !important';
}

// const a = function () {
// popupMenuUpFunc('actor' + actorCnt + '_popup');
// };
// const b = function () {
// popupMenuDownFunc('actor' + actorCnt + '_popup');
// };
const g = elem.append('g');
g.attr('id', 'actor' + actorCnt + '_popup');
g.attr('class', 'actorPopupMenu');
g.attr('display', displayValue);
g.attr('onmouseover', popupMenu('actor' + actorCnt + '_popup'));
g.attr('onmouseout', popdownMenu('actor' + actorCnt + '_popup'));
// g.on('onmouseover', a);
// g.on('onmouseout', b);

var actorClass = '';
if (typeof rectData.class !== 'undefined') {
Expand Down Expand Up @@ -123,6 +131,19 @@ export const popdownMenu = function (popid) {
);
};

const popupMenuUpFunc = function (popupId) {
var pu = document.getElementById(popupId);
if (pu != null) {
pu.style.display = 'block';
}
};

const popupMenuDownFunc = function (popupId) {
var pu = document.getElementById(popupId);
if (pu != null) {
pu.style.display = 'none';
}
};
export const drawText = function (elem, textData) {
let prevTextHeight = 0,
textHeight = 0;
Expand Down Expand Up @@ -321,6 +342,12 @@ const drawActorTypeParticipant = function (elem, actor, conf) {

g = boxpluslineGroup.append('g');
actor.actorCnt = actorCnt;
// const a = function () {
// popupMenuUpFunc('actor' + actorCnt + '_popup');
// };
// const b = function () {
// popupMenuDownFunc('actor' + actorCnt + '_popup');
// };
if (actor.links != null) {
g.attr('onmouseover', popupMenu('actor' + actorCnt + '_popup'));
g.attr('onmouseout', popdownMenu('actor' + actorCnt + '_popup'));
Expand Down

0 comments on commit 18ecf47

Please sign in to comment.