Fixes lint warning W004 in src/display/{api, canvas, pattern_helper}.js