Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions lime/src/fill/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,21 @@ lime.fill.Image.prototype.getPixelSizeAndOffset = function(shape){
* Common functionality so it could be reused on Frame
* @protected
*/
lime.fill.Image.prototype.setDOMBackgroundProp_ = function(domEl,shape){
var so = this.getPixelSizeAndOffset(shape),size=so[0],offset=so[1],q = shape.getRelativeQuality();
domEl.style[lime.style.getCSSproperty('BackgroundSize')] = size.width*q+'px '+size.height*q+'px';
lime.fill.Image.prototype.setDOMBackgroundProp_ = (function () {
var stylename = lime.style.getCSSproperty('BackgroundSize');
return function (domEl, shape) {
var so = this.getPixelSizeAndOffset(shape),
size = so[0],
offset = so[1];
domEl.style[stylename] = size.width + 'px ' + size.height + 'px';
var stroke = shape.stroke_?shape.stroke_.width_:0;
domEl.style['backgroundPosition'] = (offset.x*q-stroke)+'px '+(offset.y*q-stroke)+'px';
domEl.style['backgroundPosition'] = (offset.x - stroke) + 'px ' + (offset.y - stroke) + 'px';
//domEl.style['backgroundRepeat'] = 'no-repeat';
if (this.qualityRenderer)
if (this.qualityRenderer) {
domEl.style['imageRendering'] = 'optimizeQuality';
}
};
})();

lime.fill.Image.prototype.IS_IOS_CHROME = lime.userAgent.IOS &&
(lime.userAgent.CHROME || /CriOS/.test(goog.global.navigator.userAgent));
Expand Down