Skip to content

Commit aacfa32

Browse files
author
zhenshuai
committed
bug
1 parent d920041 commit aacfa32

File tree

3 files changed

+40
-39
lines changed

3 files changed

+40
-39
lines changed

dist/angular-wt-genius-min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-wt-genius.js

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,41 @@
11
angular.module('wt.genius', []);
2+
/**
3+
* $wtRetina
4+
*
5+
* Version: 1.0.0 - 2015-10-19
6+
* Anthor: zhenshuai
7+
*/
8+
(function () {
9+
'use strict';
10+
angular.module('wt.genius')
11+
.provider('$wtRetina', [function () {
12+
var defaults = {
13+
onchange: function () {
14+
//console.log('dpi 切换事件');
15+
}
16+
};
17+
var configOptions = {};
18+
this.config = function (value) {
19+
configOptions = value;
20+
};
21+
this.$get = [
22+
function () {
23+
var mediaQuery = "(min--moz-device-pixel-ratio: 1.5),\
24+
(-o-min-device-pixel-ratio: 3/2),\
25+
(-webkit-min-device-pixel-ratio: 1.5),\
26+
(min-device-pixel-ratio: 1.5),\
27+
(min-resolution: 144dpi),\
28+
(min-resolution: 1.5dppx)";
29+
30+
var matchObj = window.matchMedia(mediaQuery);
31+
return {
32+
isRetina: matchObj.matches,
33+
media : matchObj.media
34+
};
35+
}
36+
];
37+
}]);
38+
})();
239
/**
340
* $wtNotify
441
*
@@ -69,7 +106,7 @@ angular.module('wt.genius', []);
69106
onSuccess && onSuccess();
70107
}
71108
result.notSetPermission = false;
72-
onThen();
109+
onThen && onThen();
73110
},
74111
needsPermission : Notify.needsPermission,
75112
requestPermission: Notify.requestPermission,
@@ -79,41 +116,4 @@ angular.module('wt.genius', []);
79116
return result;
80117
}];
81118
}]);
82-
})();
83-
/**
84-
* $wtRetina
85-
*
86-
* Version: 1.0.0 - 2015-10-19
87-
* Anthor: zhenshuai
88-
*/
89-
(function () {
90-
'use strict';
91-
angular.module('wt.genius')
92-
.provider('$wtRetina', [function () {
93-
var defaults = {
94-
onchange: function () {
95-
//console.log('dpi 切换事件');
96-
}
97-
};
98-
var configOptions = {};
99-
this.config = function (value) {
100-
configOptions = value;
101-
};
102-
this.$get = [
103-
function () {
104-
var mediaQuery = "(min--moz-device-pixel-ratio: 1.5),\
105-
(-o-min-device-pixel-ratio: 3/2),\
106-
(-webkit-min-device-pixel-ratio: 1.5),\
107-
(min-device-pixel-ratio: 1.5),\
108-
(min-resolution: 144dpi),\
109-
(min-resolution: 1.5dppx)";
110-
111-
var matchObj = window.matchMedia(mediaQuery);
112-
return {
113-
isRetina: matchObj.matches,
114-
media : matchObj.media
115-
};
116-
}
117-
];
118-
}]);
119119
})();

src/wt-notify/wt-notify.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* $wtNotify
33
*
4+
* Version: 1.1.0 - 2016-09-23
45
* Version: 1.0.0 - 2015-08-25
56
* Anthor: zhenshuai
67
*/

0 commit comments

Comments
 (0)