npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ngx-float-ball

v0.1.1

Published

这是一个Angular的悬浮球控件。

Downloads

6

Readme

ngx-float-ball

这是一个Angular的悬浮球控件。

  • 支持触摸滑动
  • 支持鼠标拖动
  • 支持图标

效果展示

参数说明

Parameter | Type | Default Value | Description :---:|:---:|:---:|:---: clicked | signal | N/A | 鼠标点击事件 outerCircleDiameter | number | 60 | 外圆的直径 innerCircleDiameter | number | 30 | 内圆的直径 delayTime | 400 | number | 鼠标移动延迟响应时间 isBlinked | boolean | true | 是否闪烁悬浮球 hasRipple | boolean | true | 是否有点击波纹效果 foreground | string | #ffffff | 前景色,默认为白色 background | string | #F44336 | 前景色,默认为红色 icon | string | null | 图标路径 iconDiameter | number | 30 | 图标的直径 initPos | number[] | [200, 200] | 悬浮球的初始化位置 touchOffset | number | 15 | 触摸移动误差15px openInertia | boolean | true | 开启弹性双边吸附功能

安装

npm install ngx-float-ball --save

使用

  1. 在app.module.ts内导入:
import { NgxFloatBallModule } from 'ngx-float-ball'
  1. 在html内使用
<ngx-float-ball [isBlinked]="true"
    [hasRipple]="false"
    [icon]="'../assets/face.svg'">
</ngx-float-ball>

  1. 弹力吸附功能
<ngx-float-ball [openInertia]="true">
</ngx-float-ball>

TODO

  • [x] 增加背景色和前景色属性
  • [x] 增加图标支持
  • [x] 优化渲染
  • [ ] 增加tap,点击,双击,长按
  • [x] 触摸到窗口外边界, 造成悬浮球不见防呆
  • [ ] 鼠标点击后动画消失,背景色更改至设定背景色
  • [ ] 增加自定义嵌入元素
  • [x] 增加弹力吸附
  • [ ] 修复鼠标单击后快速移动到某一位置,达到延迟时间后,松开鼠标,悬浮球快速移动过去
  • [x] 修复悬浮球未移动浏览器F12后,位置更换到[0,0]的错误
  • [ ] 增加悬浮球scss样式重载

License

  • MIT