blessed-contrib
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -7,3 +7,4 @@ var utils = require('../utils') | ||
function Grid(options) { | ||
if (!options.screen) throw "error: a screen property must be specified in the grid options" | ||
if (!options.screen) throw "Error: A screen property must be specified in the grid options.\r\n" + | ||
"Note: Release 2.0.0 has breaking changes. Please refer to the README or to https://github.com/yaronn/blessed-contrib/issues/39" | ||
this.options = options | ||
@@ -15,2 +16,8 @@ this.cellWidth = ((100 - dashboardMargin*2) / this.options.cols) | ||
Grid.prototype.set = function(row, col, rowSpan, colSpan, obj, opts) { | ||
if (obj instanceof Grid) { | ||
throw "Error: A Grid is not allowed to be nested inside another grid.\r\n" + | ||
"Note: Release 2.0.0 has breaking changes. Please refer to the README or to https://github.com/yaronn/blessed-contrib/issues/39" | ||
} | ||
var top = row * this.cellHeight + dashboardMargin | ||
@@ -17,0 +24,0 @@ var left = col * this.cellWidth + dashboardMargin |
@@ -11,2 +11,13 @@ var blessed = require('blessed') | ||
if (Array.isArray(options.columnSpacing)) { | ||
throw "Error: columnSpacing cannot be an array.\r\n" + | ||
"Note: From release 2.0.0 use property columnWidth instead of columnSpacing.\r\n" + | ||
"Please refere to the README or to https://github.com/yaronn/blessed-contrib/issues/39" | ||
} | ||
if (!options.columnWidth) { | ||
throw "Error: A table must get columnWidth as a property. Please refer to the README." | ||
} | ||
options = options || {}; | ||
@@ -13,0 +24,0 @@ options.columnSpacing = options.columnSpacing==null? 10 : options.columnSpacing |
{ | ||
"name": "blessed-contrib", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "", | ||
@@ -17,6 +17,3 @@ "main": "index.js", | ||
"blessed": ">=0.0.44" | ||
}, | ||
"peerDependencies": { | ||
"blessed": ">=0.0.44" | ||
}, | ||
}, | ||
"dependencies": { | ||
@@ -23,0 +20,0 @@ "ansi-term": ">=0.0.1", |
38768
8
757