Code Monkey home page Code Monkey logo

demo-snap.svg's Introduction

demo-Snap.svg

It makes the study of Snap.svg simpler. It translated official documents to Chinese, meanwhile, add many demos for explaining how to use these apis.

If your PC support PHP, you can download and view at local. Otherwise, you can click here for a visit.

License

Under The MIT Micense

demo-snap.svg's People

Contributors

fakefish avatar zhangxinxu 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

demo-snap.svg's Issues

请教一个问题,不知道大神能不能看到

我在项目中使用 Snap.js 中的 path 创建了一些 svg,现在有一个需求:这些svg需要变化位置和大小。有两个思路,一个是重新计算出 pathStr,然后创建新的 path,把之前的path remove 掉,把新的path 加入到 group 中去,但这样会对其他代码有影响。
我倾向于使用 animate,现在关于 animate 有个疑问,我在看 接口的时候,

Snap(from, to, setter, duration, [easing], [callback])

其中的 setting 函数中能不能对 path 的 str 进行重新赋值,而不只是 x,y,color 这个参数?因为我整个svg 的高度和宽度都发生了变化。不知道是否支持,大神如果看到,还请指明一个方向,感激不尽。

Snap.load(url,callback)无法加载本地SVG文件

如题,不能使用Snap.load(url,callback)这个方法实现加载SVG文件,我这个是单纯将snap.svg.js引入,但是运行html,后台出现:
snap.svg.js:2631 Access to XMLHttpRequest at 'file:///Users/liwen/Downloads/Snap.svg-0.5.1/demos/animated-map/map.svg' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

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.