rlamana/ventus
소개
JavaScript, HTML5, CSS3로 작성된 창 관리자
AI 및 머신러닝측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalVentus WM 
An experimental window manager built with JavaScript, HTML5, and CSS3, originally implemented in 2012.
Live Demo! (http://www.rlamana.com/ventus) | Video Demo
[!CAUTION]
This project started as an experiment and even though it was stable enough it was never meant to be mantained over time. However, feel free to fork and send PRs!
[!NOTE] Version 0.4.0 has been modernized by automated AI agents to use Vite, ES6 modules, and contemporary tooling. While the code appears stable, it remains an experimental project and is not intended for production use.
Development Setup
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Run tests
npm test
# Preview production build
npm run preview
Installation
The library is built as both ES modules and UMD for compatibility:
// ES modules
import { WindowManager, Window } from 'ventus';
// CommonJS
const { WindowManager, Window } = require('ventus');
// UMD (browser)
const wm = new Ventus.WindowManager();
Creating a new window manager
var wm = new Ventus.WindowManager();
Creating a new empty window
var window = wm.createWindow({
title: 'A new window',
x: 50,
y: 50,
width: 400,
height: 250
});
window.open();
Creating a new empty window without animations and staying inside of the space
var window = wm.createWindow({
title: 'A new window',
x: 50,
y: 50,
width: 400,
height: 250
animations: false,
stayinspace: true,
});
window.open();
Creating a new window wrapping a DOM Element
Using a query
wm.createWindow.fromQuery('#element .selector', {
title: 'My App',
width: 330,
height: 400,
x: 670,
y: 60
});
Using a reference
wm.createWindow.fromElement(domElement, {
title: 'My App',
width: 500,
height: 500,
x: 0,
y: 0
});
Listening to events
Defining handlers in constructor
var window = wm.createWindow({
title: 'A new window',
events: {
open: function() {
console.log('The window was open');
},
closed: function() {
console.log('The window was closed');
},
}
});
Using the 'signals' property
var window = wm.createWindow({
title: 'A new window'
});
window.signals.on('open', function() {
console.log('The window was open');
});
Destroying a window
When a window is closed the content is not destroyed by default. This way windows can be open again keeping the wrapped DOM element. To completely destroy the window, the method 'destroy' needs to be called:
var window = wm.createWindow({
title: 'A new window',
events: {
closed: function() {
this.destroy();
}
}
});
관련 프로젝트 살펴보기
불러오는 중…