Skip to content

Commit 3a81b87

Browse files
author
zhenshuai
committed
bugfix
1 parent aacfa32 commit 3a81b87

File tree

2 files changed

+39
-38
lines changed

2 files changed

+39
-38
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 & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,8 @@
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-
})();
392
/**
403
* $wtNotify
414
*
5+
* Version: 1.1.0 - 2016-09-23
426
* Version: 1.0.0 - 2015-08-25
437
* Anthor: zhenshuai
448
*/
@@ -116,4 +80,41 @@ angular.module('wt.genius', []);
11680
return result;
11781
}];
11882
}]);
83+
})();
84+
/**
85+
* $wtRetina
86+
*
87+
* Version: 1.0.0 - 2015-10-19
88+
* Anthor: zhenshuai
89+
*/
90+
(function () {
91+
'use strict';
92+
angular.module('wt.genius')
93+
.provider('$wtRetina', [function () {
94+
var defaults = {
95+
onchange: function () {
96+
//console.log('dpi 切换事件');
97+
}
98+
};
99+
var configOptions = {};
100+
this.config = function (value) {
101+
configOptions = value;
102+
};
103+
this.$get = [
104+
function () {
105+
var mediaQuery = "(min--moz-device-pixel-ratio: 1.5),\
106+
(-o-min-device-pixel-ratio: 3/2),\
107+
(-webkit-min-device-pixel-ratio: 1.5),\
108+
(min-device-pixel-ratio: 1.5),\
109+
(min-resolution: 144dpi),\
110+
(min-resolution: 1.5dppx)";
111+
112+
var matchObj = window.matchMedia(mediaQuery);
113+
return {
114+
isRetina: matchObj.matches,
115+
media : matchObj.media
116+
};
117+
}
118+
];
119+
}]);
119120
})();

0 commit comments

Comments
 (0)