Skip to content

Commit

Permalink
chore: logging should check for Trace.isEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Jan 27, 2021
1 parent 44ddd70 commit c767cd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/image-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ export class ImageBase extends View {
scaleW = nativeWidth > 0 ? measureWidth / nativeWidth : 1;
scaleH = nativeHeight > 0 ? measureHeight / nativeHeight : 1;

CLog(CLogTypes.info, 'computeScaleFactor', measureWidth, measureHeight, nativeWidth, nativeHeight, widthIsFinite, heightIsFinite, aspectRatio, nativeScale, measureScale);
if (Trace.isEnabled()) {
CLog(CLogTypes.info, 'computeScaleFactor', measureWidth, measureHeight, nativeWidth, nativeHeight, widthIsFinite, heightIsFinite, aspectRatio, nativeScale, measureScale);
}
if (aspectRatio > 0) {
if (!widthIsFinite) {
scaleH = 1;
Expand Down

0 comments on commit c767cd8

Please sign in to comment.