当前位置: 首页>>代码示例>>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;未经允许,请勿转载。