Fix lint warnings and whitespaces in shape-tool.js
Optimize .actionComplete() method

[#73959546]