aktos-io / aktos-scada

Web based SCADA system for industrial and home automation systems
https://aktos.io
10 stars 9 forks source link

set-ractive-var works wrong #18

Closed ceremcem closed 9 years ago

ceremcem commented 9 years ago

if there is multiple widgets which has exact same declaration, then set-ractive-var function can not set each one correctly:

{{>thermometer {pin_name: 'test-pin'} }}
{{>thermometer {pin_name: 'test-pin'} }}
{{>thermometer {pin_name: 'test-pin'} }}
{{>thermometer {pin_name: 'test-pin'} }}

works wrong (same value is set to ractive's actor_id variable) but the following works correctly:

{{>thermometer {pin_name: 'test-pin', dummy_var: '123'} }}
{{>thermometer {pin_name: 'test-pin', dummy_var: '124'} }}
{{>thermometer {pin_name: 'test-pin', dummy_var: '125'} }}
{{>thermometer {pin_name: 'test-pin', dummy_var: '126'} }}

works correctly, because last four declaration has different keypaths.

ceremcem commented 9 years ago

Problem is discussed here: https://github.com/ractivejs/ractive/issues/2062#issuecomment-139078828