Giter Club home page Giter Club logo

ipad-cursor's Introduction

ipad-cursor's People

Contributors

catsjuice avatar innei avatar jannchie avatar overflowcat avatar weykon avatar zhouhaoyiu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ipad-cursor's Issues

`scale` is not working before cursor enters a block

  transform:
    translate(calc(-50% + var(--cursor-translateX)), calc(-50% + var(--cursor-translateY)))
    scale(var(--cursor-scale));

--cursor-translateX and --cursor-translateX are first set in onBlockMove(), which will only be triggered when mouse is moving on a block. Therefore, these two CSS variables are undefined before the cursor enters a block, resulting in the transform property being none. Consequently, scale will not work.

image

how to disable the default cursor style

Reproduce

I've set the data-cursor="block" attribute on both tags
image

2023-07-23.6.37.58.mov

Description

Could you please tell me how to achieve this effect? I didn't find the solution in documentation :P

2023-07-23.6.35.31.mov

Does not work fine with <NuxtLink />

  • When using to jump internally, the cursor cannot be moved.
  • This may seem unrelated to updateCursor. But I've implemented the use of a MutationObserver to listen for DOM changes and perform an updateCursor. the cursor is subtly unresponsive for a few seconds before being moved normally.

Docs

  • Github README (EN)
  • Github README (ZH-CN)

Is it possible to automatically detect the cursor?

Manually specifying whether the cursor is displayed as text seems a bit tricky. Can we automatically change the cursor by the cursor style of the element the cursor is pointing to?

It would probably be written like this:

// target is the dom element
const computedStyle = getComputedStyle(target);
const cursor = computedStyle.cursor;
if (cursor === 'text') {
   ...
} 

I'm not sure if this will have performance issues...

Support for Hexo (NexT theme)

Thanks for this repo!!
Recently, I wanna add this ipad-cursor into my blog built by hexo (NexT theme). But I don't know how to do that :)

Refactor API design

goals:

  • Custom style friendly
  • Collation processing logic
  • Add more typescript declaration
  • Add more JsDoc
  • Split core code into separate files

feat: add lighting effect to block

effect on iPad OS:

RPReplay_Final1688709112.mov

Add a config item called enableLighting (defaults to false), add lighting effect when this config is true

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.