mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
Notebook Views Insert Cells Modal (#16836)
* Add html-to-image package * Add image card type
This commit is contained in:
@@ -21,10 +21,12 @@ function cellCollides(c1: INotebookViewCell, c2: INotebookViewCell): boolean {
|
||||
|
||||
export class NotebookViewModel implements INotebookView {
|
||||
private _onDeleted = new Emitter<INotebookView>();
|
||||
private _onCellVisibilityChanged = new Emitter<ICellModel>();
|
||||
private _isNew: boolean = false;
|
||||
|
||||
public readonly guid: string;
|
||||
public readonly onDeleted = this._onDeleted.event;
|
||||
public readonly onCellVisibilityChanged = this._onCellVisibilityChanged.event;
|
||||
|
||||
constructor(
|
||||
protected _name: string,
|
||||
@@ -119,10 +121,12 @@ export class NotebookViewModel implements INotebookView {
|
||||
|
||||
public insertCell(cell: ICellModel) {
|
||||
this.updateCell(cell, this, { hidden: false });
|
||||
this._onCellVisibilityChanged.fire(cell);
|
||||
}
|
||||
|
||||
public hideCell(cell: ICellModel) {
|
||||
this.updateCell(cell, this, { hidden: true });
|
||||
this._onCellVisibilityChanged.fire(cell);
|
||||
}
|
||||
|
||||
public moveCell(cell: ICellModel, x: number, y: number) {
|
||||
|
||||
@@ -26,8 +26,9 @@ export interface INotebookViews {
|
||||
export interface INotebookView {
|
||||
readonly guid: string;
|
||||
readonly onDeleted: Event<INotebookView>;
|
||||
isNew: boolean;
|
||||
readonly onCellVisibilityChanged: Event<ICellModel>;
|
||||
|
||||
isNew: boolean;
|
||||
cells: Readonly<ICellModel[]>;
|
||||
hiddenCells: Readonly<ICellModel[]>;
|
||||
displayedCells: Readonly<ICellModel[]>;
|
||||
|
||||
Reference in New Issue
Block a user