Skip to content

Commit 1bb15bc

Browse files
authored
Merge pull request #2571 from adumesny/master
better error msg
2 parents 7a17fa5 + 04148b9 commit 1bb15bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gridstack.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export class GridStack {
295295
const oldOpts: OldOneColumnOpts = opts;
296296
if (oldOpts.oneColumnModeDomSort) {
297297
delete oldOpts.oneColumnModeDomSort;
298-
console.log('Error: Gridstack oneColumnModeDomSort no longer supported. Check GridStackOptions.columnOpts instead.')
298+
console.log('warning: Gridstack oneColumnModeDomSort no longer supported. Use GridStackOptions.columnOpts instead.')
299299
}
300300
if (oldOpts.oneColumnSize || oldOpts.disableOneColumnMode === false) {
301301
const oneSize = oldOpts.oneColumnSize || 768;
@@ -1139,7 +1139,7 @@ export class GridStack {
11391139
// do same for start event to make it easier...
11401140
this._gsEventHandler[name] = callback;
11411141
} else {
1142-
console.log('GridStack.on(' + name + ') event not supported');
1142+
console.error('GridStack.on(' + name + ') event not supported');
11431143
}
11441144
return this;
11451145
}
@@ -1381,7 +1381,7 @@ export class GridStack {
13811381
} else {
13821382
// NOTE: clientHeight & getBoundingClientRect() is undefined for text and other leaf nodes. use <div> container!
13831383
const child = item.firstElementChild;
1384-
if (!child) { console.log(`Error: resizeToContent() '${GridStack.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`); return; }
1384+
if (!child) { console.error(`Error: GridStack.resizeToContent() '${GridStack.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`); return; }
13851385
wantedH = child.getBoundingClientRect().height || itemH;
13861386
}
13871387
if (itemH === wantedH) return;

0 commit comments

Comments
 (0)