File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 149
149
w = locWidth * scaleX ;
150
150
h = locHeight * scaleY ;
151
151
152
- if ( texture ) {
152
+ if ( texture && texture . _htmlElementObj ) {
153
153
image = texture . _htmlElementObj ;
154
154
if ( texture . _pattern !== "" ) {
155
155
wrapper . setFillStyle ( context . createPattern ( image , texture . _pattern ) ) ;
Original file line number Diff line number Diff line change @@ -124,13 +124,17 @@ cc.profiler = (function () {
124
124
this . init ( ) ;
125
125
}
126
126
127
- cc . container . appendChild ( _fps ) ;
127
+ if ( _fps . parentElement === null ) {
128
+ cc . container . appendChild ( _fps ) ;
129
+ }
128
130
_showFPS = true ;
129
131
} ,
130
132
131
133
hideStats : function ( ) {
132
134
_showFPS = false ;
133
- cc . container . removeChild ( _fps ) ;
135
+ if ( _fps . parentElement === cc . container ) {
136
+ cc . container . removeChild ( _fps ) ;
137
+ }
134
138
} ,
135
139
136
140
init : function ( ) {
You can’t perform that action at this time.
0 commit comments