Skip to content

Commit

Permalink
revert: remove background for non-resizable textboxes
Browse files Browse the repository at this point in the history
This commit reverts 3e487b4
  • Loading branch information
marstamm authored and nikku committed Apr 23, 2024
1 parent 833fdb8 commit 998b37a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 2 additions & 5 deletions lib/TextBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ TextBox.prototype.create = function(bounds, style, value, options) {
minHeight: bounds.minHeight + 'px',
left: bounds.x + 'px',
top: bounds.y + 'px',
backgroundColor: '#ffffff',
position: 'absolute',
overflow: 'visible',
border: '1px solid #ccc',
boxSizing: 'border-box',
wordWrap: 'normal',
textAlign: 'center',
Expand Down Expand Up @@ -166,11 +168,6 @@ TextBox.prototype.create = function(bounds, style, value, options) {
}

if (options.resizable) {
assign(parent.style, {
backgroundColor: '#ffffff',
border: '1px solid #ccc'
});

this.resizable(style);
}

Expand Down
4 changes: 0 additions & 4 deletions test/DirectEditingSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,8 @@ describe('diagram-js-direct-editing', function() {

// then
var resizeHandle = directEditing._textbox.parent.getElementsByClassName('djs-direct-editing-resize-handle')[0];
var parent = directEditing._textbox.parent;

expect(resizeHandle).to.exist;
expect(parent.getAttribute('style').indexOf('background-color:')).not.to.eql(-1);
}));


Expand All @@ -573,10 +571,8 @@ describe('diagram-js-direct-editing', function() {

// then
var resizeHandle = directEditing._textbox.parent.getElementsByClassName('djs-direct-editing-resize-handle')[0];
var parent = directEditing._textbox.parent;

expect(resizeHandle).not.to.exist;
expect(parent.getAttribute('style').indexOf('background-color:')).to.eql(-1);
}));


Expand Down

0 comments on commit 998b37a

Please sign in to comment.