GithubHelp home page GithubHelp logo

mustafahi / sciter-movableview Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 14 KB

Movable view for Sciter windows, allows you to move the window using any element inside it. with few features.

License: The Unlicense

HTML 34.80% JavaScript 65.20%
sciter sciter-sdk tiscript sciter-js

sciter-movableview's Introduction

MovableView

> Tiscript   : 1.3.0
> Javascript : 1.3.0

Movable view for Sciter windows, allows you to move the window using any element in it.
Advantages:

  1. Cheating windows performance setting, you will see the full window and not just a rectangle while moving it in performance mode.
  2. Optional prevent crossing screen bounds.
  3. Does NOT conflict with CSS cursor properties, unlike role="window-caption".
  4. Allows dragging beyond the top edge of the screen, which is prevented by Aero Snap on Windows when using role="window-caption".

Using inside a compiled application should use less than 1% CPU (while moving the view).

Install

Add this file to your resources/UI folder

movableView.tis // OR
movableView.js

Then add the file to your project either from HTML :

<script src="movableView.tis" type="text/tiscript"></script> // OR
<script src="movableView.js"  type="text/javascript"></script>

or from your main script file :

include "movableView.tis"; // OR
import movableView from "movableView.js" // uncomment last line in `movableView.js`

Then initiate it by calling

movableView("selector" [, screenBound:bool(false)]);

with the selector being any CSS selector i.e. div .div #div
the second parameter true|false to prevent window from going past the screen boundaries.

sciter-movableview's People

Contributors

girkovarpa avatar mustafahi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sciter-movableview's Issues

temps-lite now uses movableView!

Just wanted to let you know I replaced the built-in drag functionality (role=window-caption) with yours in this weather app, and added you to the contributors in the readme.

Thought you would be interested in hearing of new uses, and I didn't know how else to notify you other than opening an issue ๐Ÿ˜„

Any plans for Sciter.JS port?

I'm working on it, but having a hard time.

The reason I don't want to use window-role="caption" is because it conflicts with css cursor properties.

Sciter.JS supports capture now

Going off of memory here, in onMouseDown(e) I put e.target.capture = true and false in onMouseUp(e) but it didn't stop the window from getting left behind when you drag too quickly. Is there more to it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.