terriajs icon indicating copy to clipboard operation
terriajs copied to clipboard

Option to remove specific trait when mixing traits

Open zoran995 opened this issue 4 years ago • 2 comments

It will be useful to have an option to remove a specific trait from the list of traits. For example, currently, only Cesium3DTilesCatalogItem uses featureInfoUrlTemplate trait, but it is listed as a valid trait for all other catalog items. This is also useful from the documentation aspect.

This is also the case with attribution which is a valid option in all catalog items except GtfsCatalogItem.

Also for future development, it might be useful to have conflict traits option (when it is allowed to specify only one trait from the list of traits, as only one will be used).

zoran995 avatar Feb 02 '21 11:02 zoran995

Just my opinion: the right approach for now might be to refactor and move featureInfoUrlTemplate out into its own Traits class so that it does not get mixed into all the other catalog items.

na9da avatar Feb 08 '21 22:02 na9da

When we have this implemented - there is an instance where it should be applied here

  • https://github.com/TerriaJS/terriajs/pull/6972#issuecomment-1814352273

nf-s avatar Nov 30 '23 22:11 nf-s