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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?