projectweekend / angular-skycons Goto Github PK
View Code? Open in Web Editor NEWAn AngularJS directive for Forecast.io animated skycons
License: MIT License
An AngularJS directive for Forecast.io animated skycons
License: MIT License
I have an issue were I need to modify the color of an existing icon. I see that there are $watch functions to see if the icon or size changes, but not one for the color. It doesn't look like the skycons library supports changing the color. I suppose you could instantiate a new instance of Skycons, but that feels very hacky. Do you have any other ideas of how this could be done?
Hi, thanks for your work :)
I'm wondering why do you add a jquery dependency in your ReadMe ? It doesn't seem to be used in the module ?
When I use the minified version, I am getting this console error:
TypeError: a.drawing is not a function
at Object.Skycons.draw (http://localhost/myapp/bower_components/angular-skycons/angular-skycons.min.js:1:7570)
at Object.Skycons.add (http://localhost/myapp/bower_components/angular-skycons/angular-skycons.min.js:1:6998)
at link (http://localhost/myapp/bower_components/angular-skycons/angular-skycons.min.js:1:8244)
at http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:70:370
at $ (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:70:426)
at v (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:59:401)
at g (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:52:9)
at g (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:52:26)
at g (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:52:26)
at g (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:52:26) <skycon icon="weather.skycon.icon" class="ng-isolate-scope">
Order of my scripts:
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js"></script>
<script src="//code.angularjs.org/1.3.8/angular-animate.min.js"></script>
<script src="assets/js/ui-router.min.js"></script>
<script src="bower_components/angular-skycons/angular-skycons.min.js"></script>
It works fine when not using minified version.
Hi I'm getting this error ReferenceError: Skycons is not defined. On this line of code in the angular-skycons.js file.
var skycons = new Skycons( config );
I'm also using webpack and an alias to resolve the angular-skycons.min.js file. I'm not sure if I'm missing something maybe a require statement? I'm new to webpack also. Thank you for any help.
Hi, thanks for this. I think you should add skycons.remove in your scope.$watch( "icon",...). Currently, icon is not updated when value changes.
scope.$watch( "icon", function () {
skycons.remove( canvas);
skycons.add( canvas, scope.icon );
}, true );
I just tried to run a bower install
on your package and received saw this output:
$ bower install --save angular-skycons
bower angular-skycons#* not-cached git://github.com/projectweekend/angular-skycons.git#*
bower angular-skycons#* resolve git://github.com/projectweekend/angular-skycons.git#*
bower angular-skycons#* download https://github.com/projectweekend/angular-skycons/archive/0.0.7.tar.gz
bower angular-skycons#* extract archive.tar.gz
bower angular-skycons#* mismatch Version declared in the json (0.0.5) is different than the resolved one (0.0.7)
bower angular-skycons#* resolved git://github.com/projectweekend/angular-skycons.git#0.0.7
bower skycons#* not-cached git://github.com/darkskyapp/skycons.git#*
bower skycons#* resolve git://github.com/darkskyapp/skycons.git#*
bower skycons#* checkout master
bower skycons#* invalid-meta skycons is missing "main" entry in bower.json
bower skycons#* invalid-meta skycons is missing "ignore" entry in bower.json
bower skycons#* resolved git://github.com/darkskyapp/skycons.git#b0b7e4168d
bower angular-skycons#~0.0.7 install angular-skycons#0.0.7
bower skycons#* install skycons#b0b7e4168d
angular-skycons#0.0.7 public/lib/angular-skycons
└── skycons#b0b7e4168d
skycons#b0b7e4168d public/lib/skycons
After checking bower.json
, it looks like the version you have defined is 0.0.5 while the latest tag in the repository is 0.0.7.
The simple solution seems to be to bump the version number in bower.json
and everything should be peachy again.
I've pulled this into my project for testing and found an error.
The icon value in the docs is a string, however, it appears as if it needs to be a function such as Skycons.PARTLY_CLOUDY_DAY.
How do you expect to convert the value returned by forecast.io to be converted into a function?
$scope.CurrentWeather = {
forecast: {
icon: "partly-cloudy-night",
...
}
};
Hello,
First of all thank you for your work, this plugin is very cool.
The only problem is that I can not integrate it with webpack and the npm repository.
In my entry file i put this line :
import Skycons from 'skycons' ;
and i have one error in my console when i call the plugin like this :
var skycons = new Skycons({"color": color});
skycons.add(element[0], newValues);
skycons.play();
The console error :
TypeError: skycons.add is not a function
Do you have a solution ? thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.