1
0
Fork 0
forked from 0x2620/oxjs

merging changes

This commit is contained in:
rlx 2011-08-06 17:41:01 +00:00
commit 8e468ced0b
7 changed files with 31 additions and 14 deletions

View file

@ -6,6 +6,7 @@ Ox.IconItem <f:Ox.Element> IconItem Object
(options) -> <f> IconItem Object
(options, self) -> <f> IconItem Object
options <o> Options object
borderRadius <n|0> border radius for icon images
fixedRatio <b|n|false> if set to a number, icons have a fixed ratio
height <n|128> icon height
id <s> element id
@ -24,6 +25,7 @@ Ox.IconItem = function(options, self) {
self = self || {};
var that = Ox.Element({}, self)
.defaults({
borderRadius: 0,
fixedRatio: false,
height: 128,
id: '',
@ -64,7 +66,8 @@ Ox.IconItem = function(options, self) {
})
.css({
width: self.options.width + 'px',
height: self.options.height + 'px'
height: self.options.height + 'px',
borderRadius: self.options.borderRadius + 4 + 'px'
})
.mousedown(mousedown)
.mouseenter(mouseenter)
@ -103,7 +106,8 @@ Ox.IconItem = function(options, self) {
width: self.options.width + 'px',
height: self.options.height + 'px',
// firefox is 1px off when centering images with odd width and scaleY(-1)
paddingLeft: ($.browser.mozilla && self.options.width % 2 ? 1 : 0) + 'px'
paddingLeft: ($.browser.mozilla && self.options.width % 2 ? 1 : 0) + 'px',
borderRadius: self.options.borderRadius + 4 + 'px'
});
that.$gradient = $('<div>')
.css({