Closed ing4prg closed 5 years ago
In a previous version I have used this syntax to predefine a style for multiple drawings:
$.jCanvas(); $.jCanvas({ strokeStyle:color, strokeWidth:1, rounded:true });
Is there another syntax to replace this deprecated method? When draw multiple lines, it is easier to have some styles predefined.
Thanks!
@ing4prg My only recommendation would be to use $.extend:
$.extend
var defaults = { strokeWidth: 1, rounded: true }; $('#my-canvas').drawLine($.extend({ strokeStyle: 'red' }, defaults));
In a previous version I have used this syntax to predefine a style for multiple drawings:
$.jCanvas(); $.jCanvas({ strokeStyle:color, strokeWidth:1, rounded:true });
Is there another syntax to replace this deprecated method? When draw multiple lines, it is easier to have some styles predefined.
Thanks!