- Constraint constraint = Constraint::New<float>( mPropertyX,
- LocalSource( mPropertyPosition ),
- Source( self, mPropertyPanning ),
- InternalXConstraint );
- mScrollMainInternalXConstraint = self.ApplyConstraint(constraint);
+ if( ! mScrollMainInternalXConstraint )
+ {
+ Constraint constraint = Constraint::New<float>( mPropertyX,
+ LocalSource( mPropertyPosition ),
+ Source( self, mPropertyPanning ),
+ InternalXConstraint );
+ mScrollMainInternalXConstraint = self.ApplyConstraint( constraint );
+ }
+ if( ! mScrollMainInternalYConstraint )
+ {
+ Constraint constraint = Constraint::New<float>( mPropertyY,
+ LocalSource( mPropertyPosition ),
+ Source( self, mPropertyPanning ),
+ InternalYConstraint );
+ mScrollMainInternalYConstraint = self.ApplyConstraint( constraint );
+ }