Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(context-pad): ensure context pad is always in front #576

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/diagram-js.css
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ marker.djs-dragger tspan {
*/
.djs-overlay-context-pad {
width: 72px;
z-index: 100;
}

.djs-context-pad {
Expand Down
12 changes: 10 additions & 2 deletions test/spec/features/context-pad/ContextPadSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
} from 'min-dom';

import contextPadModule from 'lib/features/context-pad';
import overlayModule from 'lib/features/overlays';

import ContextPadProvider from './ContextPadProvider';

Expand Down Expand Up @@ -265,7 +266,7 @@ describe('features/context-pad', function() {

describe('lifecycle', function() {

beforeEach(bootstrapDiagram({ modules: [ contextPadModule, providerModule ] }));
beforeEach(bootstrapDiagram({ modules: [ contextPadModule, providerModule, overlayModule ] }));


function expectEntries(contextPad, element, entries) {
Expand All @@ -282,13 +283,20 @@ describe('features/context-pad', function() {
}


it('should open', inject(function(canvas, contextPad) {
it.only('should open', inject(function(canvas, contextPad, overlays) {

// given
var shape = { id: 's1', width: 100, height: 100, x: 10, y: 10 };

canvas.addShape(shape);

overlays.add(shape, {
position: {
right: 10,
top: 10
},
html: '<div class="overlay">FOO</div>'
});

// when
contextPad.open(shape);
Expand Down