|
@@ -382,6 +382,19 @@ const SpreadJsObj = {
|
|
if (colSetting.cellType === 'unit') {
|
|
if (colSetting.cellType === 'unit') {
|
|
if (!sheet.extendCellType.unit) {
|
|
if (!sheet.extendCellType.unit) {
|
|
sheet.extendCellType.unit = this.CellType.getUnitCellType();
|
|
sheet.extendCellType.unit = this.CellType.getUnitCellType();
|
|
|
|
+ sheet.bind(spreadNS.Events.LeaveCell, function (e, info) {
|
|
|
|
+ const cellType = info.sheet.getCell(info.row, info.col).cellType();
|
|
|
|
+ if (cellType === sheet.extendCellType.unit) {
|
|
|
|
+ info.sheet.leaveCell = {row: info.row, col: info.col};
|
|
|
|
+ } else {
|
|
|
|
+ delete info.sheet.leaveCell;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ sheet.bind(spreadNS.Events.EnterCell, function (e, info) {
|
|
|
|
+ if (info.sheet.leaveCell) {
|
|
|
|
+ info.sheet.repaint(info.sheet.getCellRect(info.sheet.leaveCell.row, info.sheet.leaveCell.col));
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
sheet.getRange(-1, col, -1, 1).cellType(sheet.extendCellType.unit);
|
|
sheet.getRange(-1, col, -1, 1).cellType(sheet.extendCellType.unit);
|
|
}
|
|
}
|
|
@@ -1429,7 +1442,7 @@ const SpreadJsObj = {
|
|
* @returns {ActiveComboCellType}
|
|
* @returns {ActiveComboCellType}
|
|
*/
|
|
*/
|
|
getActiveComboCellType: function () {
|
|
getActiveComboCellType: function () {
|
|
- const ActiveComboCellType = function () { };
|
|
|
|
|
|
+ const ActiveComboCellType = function () {};
|
|
ActiveComboCellType.prototype = new spreadNS.CellTypes.ComboBox();
|
|
ActiveComboCellType.prototype = new spreadNS.CellTypes.ComboBox();
|
|
const proto = ActiveComboCellType.prototype;
|
|
const proto = ActiveComboCellType.prototype;
|
|
proto.paintValue = function (ctx, value, x, y, w, h, style, options) {
|
|
proto.paintValue = function (ctx, value, x, y, w, h, style, options) {
|