mirror of
https://github.com/hiloteam/Hilo.git
synced 2026-01-25 16:25:48 +00:00
6 lines
586 B
JavaScript
6 lines
586 B
JavaScript
/**
|
|
* hilojs 2.0.3 for cmd
|
|
* Copyright 2016 alibaba.com
|
|
* Licensed under the MIT License
|
|
*/
|
|
define(function(t,e,i){var a,h,c=t("hilo/view/Drawable"),r=t("hilo/util/browser"),n={_cacheDirty:!0,cache:function(t){(t||this._cacheDirty||!this.drawable)&&this.updateCache()},updateCache:function(){r.supportCanvas&&(a||(a=document.createElement("canvas"),h=a.getContext("2d")),a.width=this.width,a.height=this.height,this._draw(h),this.drawable=this.drawable||new c,this.drawable.init({image:a.toDataURL()}),this._cacheDirty=!1)},setCacheDirty:function(t){this._cacheDirty=t}};return n}); |