We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d46304 commit 4a1b969Copy full SHA for 4a1b969
1 file changed
src/physics/matter-js/lib/constraint/Constraint.js
@@ -69,7 +69,8 @@ var Common = require('../core/Common');
69
lineWidth: 2,
70
strokeStyle: '#ffffff',
71
type: 'line',
72
- anchors: true
+ anchors: true,
73
+ custom: false
74
};
75
76
if (constraint.length === 0 && constraint.stiffness > 0.1) {
@@ -79,6 +80,12 @@ var Common = require('../core/Common');
79
80
render.type = 'spring';
81
}
82
83
+ // If the constraint has a render options set, we'll treat it as a custom override
84
+ if (constraint.hasOwnProperty('render'))
85
+ {
86
+ render.custom = true;
87
+ }
88
+
89
constraint.render = Common.extend(render, constraint.render);
90
91
return constraint;
0 commit comments