當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript logger.debug方法代碼示例

本文整理匯總了TypeScript中core/logging.logger.debug方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript logger.debug方法的具體用法?TypeScript logger.debug怎麽用?TypeScript logger.debug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在core/logging.logger的用法示例。


在下文中一共展示了logger.debug方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: initialize

  initialize(options: any): void {
    super.initialize(options)

    this.map_el = this.model.map ? this.el.appendChild(div({class: "bk-canvas-map"})) : null

    switch (this.model.output_backend) {
      case "canvas":
      case "webgl": {
        this.canvas_el = this.el.appendChild(canvas({class: "bk-canvas"}))
        const ctx = this.canvas_el.getContext('2d')
        if (ctx == null)
          throw new Error("unable to obtain 2D rendering context")
        this._ctx = ctx
        break
      }
      case "svg": {
        const ctx = new SVGRenderingContext2D()
        this._ctx = ctx
        this.canvas_el = this.el.appendChild(ctx.getSvg())
        break
      }
    }

    this.overlays_el = this.el.appendChild(div({class: "bk-canvas-overlays"}))
    this.events_el   = this.el.appendChild(div({class: "bk-canvas-events"}))

    fixup_ctx(this._ctx)

    logger.debug("CanvasView initialized")
  }
開發者ID:,項目名稱:,代碼行數:30,代碼來源:

示例2: initialize

  initialize(): void {
    super.initialize()

    this.canvas = new Canvas({
      map: this.use_map != null ? this.use_map : false,
      use_hidpi: this.plot.hidpi,
      output_backend: this.plot.output_backend,
    })

    this.frame = new CartesianFrame({
      x_range: this.plot.x_range,
      extra_x_ranges: this.plot.extra_x_ranges,
      x_scale: this.plot.x_scale,
      y_range: this.plot.y_range,
      extra_y_ranges: this.plot.extra_y_ranges,
      y_scale: this.plot.y_scale,
    })

    this.above_panel = new AbovePanel()
    this.below_panel = new BelowPanel()
    this.left_panel  = new LeftPanel()
    this.right_panel = new RightPanel()

    logger.debug("PlotCanvas initialized")
  }
開發者ID:gully,項目名稱:bokeh,代碼行數:25,代碼來源:plot_canvas.ts

示例3: initialize

  initialize(options: any): void {
    super.initialize(options)

    this.map_el = this.model.map ? this.el.appendChild(div({class: "bk-canvas-map"})) : null

    switch (this.model.output_backend) {
      case "canvas":
      case "webgl":
        this.canvas_el = this.el.appendChild(canvas({class: "bk-canvas"}))
        this._ctx = this.canvas_el.getContext('2d')
        break
      case "svg":
        this._ctx = new canvas2svg()
        this.canvas_el = this.el.appendChild(this._ctx.getSvg())
        break
    }

    this.overlays_el = this.el.appendChild(div({class: "bk-canvas-overlays"}))
    this.events_el   = this.el.appendChild(div({class: "bk-canvas-events"}))

    this.ctx = this.get_ctx()
    // work around canvas incompatibilities
    fixup_ctx(this.ctx)

    logger.debug("CanvasView initialized")
  }
開發者ID:gully,項目名稱:bokeh,代碼行數:26,代碼來源:canvas.ts

示例4: set_initial_range

 set_initial_range() {
   // check for good values for ranges before setting initial range
   let good_vals = true;
   const xrs = {};
   const yrs = {};
   for (const name in this.frame.x_ranges) {
     const rng = this.frame.x_ranges[name];
     if ((rng.start == null) || (rng.end == null) || isStrictNaN(rng.start + rng.end)) {
       good_vals = false;
       break;
     }
     xrs[name] = { start: rng.start, end: rng.end };
   }
   if (good_vals) {
     for (const name in this.frame.y_ranges) {
       const rng = this.frame.y_ranges[name];
       if ((rng.start == null) || (rng.end == null) || isStrictNaN(rng.start + rng.end)) {
         good_vals = false;
         break;
       }
       yrs[name] = { start: rng.start, end: rng.end };
     }
   }
   if (good_vals) {
     this._initial_state_info.range = this.initial_range_info = {xrs, yrs};
     return logger.debug("initial ranges set");
   } else {
     return logger.warn('could not set initial ranges');
   }
 }
開發者ID:FourtekIT-incubator,項目名稱:bokeh,代碼行數:30,代碼來源:plot_canvas.ts

示例5: set_initial_range

 set_initial_range(): void {
   // check for good values for ranges before setting initial range
   let good_vals = true
   const {x_ranges, y_ranges} = this.frame
   const xrs: {[key: string]: Interval} = {}
   const yrs: {[key: string]: Interval} = {}
   for (const name in x_ranges) {
     const {start, end} = x_ranges[name]
     if (start == null || end == null || isStrictNaN(start + end)) {
       good_vals = false
       break
     }
     xrs[name] = {start, end}
   }
   if (good_vals) {
     for (const name in y_ranges) {
       const {start, end} = y_ranges[name]
       if (start == null || end == null || isStrictNaN(start + end)) {
         good_vals = false
         break
       }
       yrs[name] = {start, end}
     }
   }
   if (good_vals) {
     this._initial_state_info.range = {xrs, yrs}
     logger.debug("initial ranges set")
   } else
     logger.warn('could not set initial ranges')
 }
開發者ID:gully,項目名稱:bokeh,代碼行數:30,代碼來源:plot_canvas.ts

示例6: update

 update() {
   logger.debug(`TileSource: tile cache count: ${Object.keys(this.tiles).length}`);
   for (const key in this.tiles) {
     const tile = this.tiles[key];
     tile.current = false;
     tile.retain = false;
   }
 }
開發者ID:FourtekIT-incubator,項目名稱:bokeh,代碼行數:8,代碼來源:tile_source.ts

示例7: _doc_attached

 protected _doc_attached(): void {
   this.canvas.attach_document(this.document!)
   this.frame.attach_document(this.document!)
   this.above_panel.attach_document(this.document!)
   this.below_panel.attach_document(this.document!)
   this.left_panel.attach_document(this.document!)
   this.right_panel.attach_document(this.document!)
   super._doc_attached()
   logger.debug("PlotCanvas attached to document")
 }
開發者ID:gully,項目名稱:bokeh,代碼行數:10,代碼來源:plot_canvas.ts

示例8: _doc_attached

 _doc_attached() {
   this.canvas.attach_document(this.document);
   this.frame.attach_document(this.document);
   this.above_panel.attach_document(this.document);
   this.below_panel.attach_document(this.document);
   this.left_panel.attach_document(this.document);
   this.right_panel.attach_document(this.document);
   super._doc_attached();
   logger.debug("PlotCanvas attached to document");
 }
開發者ID:FourtekIT-incubator,項目名稱:bokeh,代碼行數:10,代碼來源:plot_canvas.ts

示例9: initialize

  initialize(options: any): void {
    this.pause();

    super.initialize(options);

    this.force_paint = new Signal(this, "force_paint");
    this.state_changed = new Signal(this, "state_changed");

    this.lod_started = false;
    this.visuals = new Visuals(this.model.plot);

    this._initial_state_info = {
      range: null,                     // set later by set_initial_range()
      selection: {},                   // XXX: initial selection?
      dimensions: {
        width: this.model.canvas._width.value,
        height: this.model.canvas._height.value,
      },
    };

    this.state = {history: [], index: -1}

    // compat, to be removed
    this.frame = this.model.frame;

    this.canvas = this.model.canvas;
    this.canvas_view = new this.canvas.default_view({model: this.canvas, parent: this});
    this.el.appendChild(this.canvas_view.el);
    this.canvas_view.render();

    // If requested, try enabling webgl
    if (this.model.plot.output_backend === "webgl") {
      this.init_webgl();
    }

    this.throttled_paint = throttle((() => this.force_paint.emit(undefined)), 15); // TODO (bev) configurable

    this.ui_event_bus = new UIEvents(this, this.model.toolbar, this.canvas_view.el, this.model.plot);

    this.levels = {};
    for (const level of enums.RenderLevel) {
      this.levels[level] = {};
    }

    this.renderer_views = {};
    this.tool_views = {};

    this.build_levels();
    this.build_tools();

    this.update_dataranges();

    this.unpause(true);
    logger.debug("PlotView initialized");
  }
開發者ID:FourtekIT-incubator,項目名稱:bokeh,代碼行數:55,代碼來源:plot_canvas.ts

示例10: _active_change

  _active_change(tool: Tool): void {
    const {event_type} = tool

    if (event_type == null)
      return

    const event_types = isString(event_type) ? [event_type] : event_type

    for (const et of event_types) {
      if (tool.active) {
        const currently_active_tool = this.gestures[et].active
        if (currently_active_tool != null && tool != currently_active_tool) {
          logger.debug(`Toolbar: deactivating tool: ${currently_active_tool.type} (${currently_active_tool.id}) for event type '${et}'`)
          currently_active_tool.active = false
        }
        this.gestures[et].active = tool
        logger.debug(`Toolbar: activating tool: ${tool.type} (${tool.id}) for event type '${et}'`)
      } else
        this.gestures[et].active = null
    }
  }
開發者ID:jsignell,項目名稱:bokeh,代碼行數:21,代碼來源:toolbar_base.ts


注:本文中的core/logging.logger.debug方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。