Doesn't allow user to select labels text during selection

This commit is contained in:
ziajka 2018-04-13 11:08:52 +02:00
parent 712aef6834
commit e6920af03b
2 changed files with 4 additions and 1 deletions

View File

@ -86,6 +86,8 @@ describe('InterfaceLabelsWidget', () => {
expect(sourceInterface.getAttribute('y')).toEqual('220');
expect(sourceInterface.getAttribute('transform')).toEqual('rotate(5, 110, 220)');
expect(sourceInterface.getAttribute('style')).toEqual('font-size: 12px');
expect(sourceInterface.getAttribute('class')).toContain('noselect');
const targetInterface = drew.nodes()[1];
expect(targetInterface.innerHTML).toEqual('Interface 2');
@ -93,6 +95,7 @@ describe('InterfaceLabelsWidget', () => {
expect(targetInterface.getAttribute('y')).toEqual('360');
expect(targetInterface.getAttribute('transform')).toEqual('rotate(0, 270, 360)');
expect(targetInterface.getAttribute('style')).toEqual('');
expect(targetInterface.getAttribute('class')).toContain('noselect');
});
});

View File

@ -31,7 +31,7 @@ export class InterfaceLabelWidget {
const enter = labels
.enter()
.append<SVGTextElement>('text')
.attr('class', 'interface_label');
.attr('class', 'interface_label noselect');
const merge = labels
.merge(enter);