@jupytergis/schema 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -172,7 +172,7 @@ export interface IJGISStoryMap {
172
172
  * Array of story segments for the story map
173
173
  */
174
174
  storySegments?: string[];
175
- presentaionBgColor?: PresentationBackgroundColor;
175
+ presentationBgColor?: PresentationBackgroundColor;
176
176
  presentaionTextColor?: PresentationTextColor;
177
177
  [k: string]: any;
178
178
  }
@@ -236,6 +236,10 @@ export interface IJupyterGISModel extends DocumentRegistry.IModel {
236
236
  storySegmentId: string;
237
237
  storyId: string;
238
238
  } | null;
239
+ segmentAdded: ISignal<IJupyterGISModel, {
240
+ storySegmentId: string;
241
+ storyId: string;
242
+ }>;
239
243
  isSpectaMode(): boolean;
240
244
  }
241
245
  export interface IUserData {
package/lib/model.d.ts CHANGED
@@ -180,6 +180,10 @@ export declare class JupyterGISModel implements IJupyterGISModel {
180
180
  storySegmentId: string;
181
181
  storyId: string;
182
182
  } | null;
183
+ get segmentAdded(): ISignal<this, {
184
+ storySegmentId: string;
185
+ storyId: string;
186
+ }>;
183
187
  /**
184
188
  * Add an item in the layer tree.
185
189
  *
@@ -243,6 +247,7 @@ export declare class JupyterGISModel implements IJupyterGISModel {
243
247
  private _sharedMetadataChanged;
244
248
  private _zoomToPositionSignal;
245
249
  private _addFeatureAsMsSignal;
250
+ private _segmentAdded;
246
251
  private _updateLayerSignal;
247
252
  private _isTemporalControllerActive;
248
253
  private _editing;
package/lib/model.js CHANGED
@@ -57,6 +57,7 @@ export class JupyterGISModel {
57
57
  this._sharedMetadataChanged = new Signal(this);
58
58
  this._zoomToPositionSignal = new Signal(this);
59
59
  this._addFeatureAsMsSignal = new Signal(this);
60
+ this._segmentAdded = new Signal(this);
60
61
  this._updateLayerSignal = new Signal(this);
61
62
  this._isTemporalControllerActive = false;
62
63
  this._editing = null;
@@ -545,6 +546,10 @@ export class JupyterGISModel {
545
546
  const storySegments = [newStorySegmentId];
546
547
  const storyMap = { title, storyType, storySegments };
547
548
  this.sharedModel.addStoryMap(storyId, storyMap);
549
+ this._segmentAdded.emit({
550
+ storySegmentId: newStorySegmentId,
551
+ storyId,
552
+ });
548
553
  return { storySegmentId: newStorySegmentId, storyId };
549
554
  }
550
555
  else {
@@ -556,9 +561,16 @@ export class JupyterGISModel {
556
561
  }
557
562
  const newStory = Object.assign(Object.assign({}, story), { storySegments: [...((_a = story.storySegments) !== null && _a !== void 0 ? _a : []), newStorySegmentId] });
558
563
  this.sharedModel.updateStoryMap(storyId, newStory);
564
+ this._segmentAdded.emit({
565
+ storySegmentId: newStorySegmentId,
566
+ storyId,
567
+ });
559
568
  return { storySegmentId: newStorySegmentId, storyId };
560
569
  }
561
570
  }
571
+ get segmentAdded() {
572
+ return this._segmentAdded;
573
+ }
562
574
  /**
563
575
  * Add an item in the layer tree.
564
576
  *
@@ -164,7 +164,7 @@
164
164
  "type": "string"
165
165
  }
166
166
  },
167
- "presentaionBgColor": {
167
+ "presentationBgColor": {
168
168
  "type": "string",
169
169
  "title": "Presentation Background Color",
170
170
  "description": "The background color of the story map"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupytergis/schema",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "A JupyterGIS schema package.",
5
5
  "keywords": [
6
6
  "jupytergis"