titlebar

Emulate OS X window title bar

  • 所有者: kapetan/titlebar
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

titlebar

Emulate OS X window title bar. Extracted from mafintosh/playback. See the live demo.

npm install titlebar

Usage

Used with browserify or in a similar enviroment.

var titlebar = require('titlebar');

var t = titlebar();
t.appendTo(document.body);

t.on('close', function(e) {
	console.log('close');
});

// t.element exposes the root dom element
t.element.appendChild(document.createElement('div'));

// Clean up after usage
t.destroy();

The returned instance emits four events: close, minimize, fullscreen (each corresponding to one of the stoplight buttons) and maximize when double clicking on the title bar area, or holding down alt key and clicking fullscreen.

The initializer function accepts an options object.

  • style (default true): Disable default styling.
  • draggable (default true): Disable the -webkit-app-region CSS property on the root element. Allows a frameless windows to be dragged in an electron application.

主要指标

概览
名称与所有者kapetan/titlebar
主编程语言JavaScript
编程语言HTML (语言数: 3)
平台
许可证
所有者活动
创建于2015-04-13 18:51:19
推送于2017-09-14 21:56:20
最后一次提交2015-10-18 22:23:35
发布数6
最新版本名称v1.4.0 (发布于 2015-10-18 22:23:35)
第一版名称v1.0.1 (发布于 2015-04-13 22:27:13)
用户参与
星数486
关注者数7
派生数31
提交数22
已启用问题?
问题数11
打开的问题数1
拉请求数1
打开的拉请求数1
关闭的拉请求数3
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?