diff --git a/packages/mindplot/test/playground/map-render/icons/arrow_down.gif b/packages/mindplot/assets/icons/arrow_down.gif similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/arrow_down.gif rename to packages/mindplot/assets/icons/arrow_down.gif diff --git a/packages/mindplot/test/playground/map-render/icons/arrow_down.png b/packages/mindplot/assets/icons/arrow_down.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/arrow_down.png rename to packages/mindplot/assets/icons/arrow_down.png diff --git a/packages/mindplot/test/playground/map-render/icons/arrow_left.png b/packages/mindplot/assets/icons/arrow_left.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/arrow_left.png rename to packages/mindplot/assets/icons/arrow_left.png diff --git a/packages/mindplot/test/playground/map-render/icons/arrow_merge.png b/packages/mindplot/assets/icons/arrow_merge.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/arrow_merge.png rename to packages/mindplot/assets/icons/arrow_merge.png diff --git a/packages/mindplot/test/playground/map-render/icons/arrow_right.png b/packages/mindplot/assets/icons/arrow_right.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/arrow_right.png rename to packages/mindplot/assets/icons/arrow_right.png diff --git a/packages/mindplot/test/playground/map-render/icons/arrow_up.png b/packages/mindplot/assets/icons/arrow_up.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/arrow_up.png rename to packages/mindplot/assets/icons/arrow_up.png diff --git a/packages/mindplot/test/playground/map-render/icons/arrowc_rotate_anticlockwise.png b/packages/mindplot/assets/icons/arrowc_rotate_anticlockwise.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/arrowc_rotate_anticlockwise.png rename to packages/mindplot/assets/icons/arrowc_rotate_anticlockwise.png diff --git a/packages/mindplot/test/playground/map-render/icons/arrowc_rotate_clockwise.png b/packages/mindplot/assets/icons/arrowc_rotate_clockwise.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/arrowc_rotate_clockwise.png rename to packages/mindplot/assets/icons/arrowc_rotate_clockwise.png diff --git a/packages/mindplot/test/playground/map-render/icons/arrowc_turn_left.png b/packages/mindplot/assets/icons/arrowc_turn_left.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/arrowc_turn_left.png rename to packages/mindplot/assets/icons/arrowc_turn_left.png diff --git a/packages/mindplot/test/playground/map-render/icons/arrowc_turn_right.png b/packages/mindplot/assets/icons/arrowc_turn_right.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/arrowc_turn_right.png rename to packages/mindplot/assets/icons/arrowc_turn_right.png diff --git a/packages/mindplot/test/playground/map-render/icons/bomb.png b/packages/mindplot/assets/icons/bomb.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/bomb.png rename to packages/mindplot/assets/icons/bomb.png diff --git a/packages/mindplot/test/playground/map-render/icons/bulb_light_off.png b/packages/mindplot/assets/icons/bulb_light_off.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/bulb_light_off.png rename to packages/mindplot/assets/icons/bulb_light_off.png diff --git a/packages/mindplot/test/playground/map-render/icons/bulb_light_on.png b/packages/mindplot/assets/icons/bulb_light_on.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/bulb_light_on.png rename to packages/mindplot/assets/icons/bulb_light_on.png diff --git a/packages/mindplot/test/playground/map-render/icons/bullet_black.png b/packages/mindplot/assets/icons/bullet_black.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/bullet_black.png rename to packages/mindplot/assets/icons/bullet_black.png diff --git a/packages/mindplot/test/playground/map-render/icons/bullet_blue.png b/packages/mindplot/assets/icons/bullet_blue.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/bullet_blue.png rename to packages/mindplot/assets/icons/bullet_blue.png diff --git a/packages/mindplot/test/playground/map-render/icons/bullet_green.png b/packages/mindplot/assets/icons/bullet_green.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/bullet_green.png rename to packages/mindplot/assets/icons/bullet_green.png diff --git a/packages/mindplot/test/playground/map-render/icons/bullet_orange.png b/packages/mindplot/assets/icons/bullet_orange.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/bullet_orange.png rename to packages/mindplot/assets/icons/bullet_orange.png diff --git a/packages/mindplot/test/playground/map-render/icons/bullet_pink.png b/packages/mindplot/assets/icons/bullet_pink.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/bullet_pink.png rename to packages/mindplot/assets/icons/bullet_pink.png diff --git a/packages/mindplot/test/playground/map-render/icons/bullet_purple.png b/packages/mindplot/assets/icons/bullet_purple.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/bullet_purple.png rename to packages/mindplot/assets/icons/bullet_purple.png diff --git a/packages/mindplot/test/playground/map-render/icons/bullet_red.png b/packages/mindplot/assets/icons/bullet_red.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/bullet_red.png rename to packages/mindplot/assets/icons/bullet_red.png diff --git a/packages/mindplot/test/playground/map-render/icons/chart_bar.png b/packages/mindplot/assets/icons/chart_bar.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/chart_bar.png rename to packages/mindplot/assets/icons/chart_bar.png diff --git a/packages/mindplot/test/playground/map-render/icons/chart_curve.png b/packages/mindplot/assets/icons/chart_curve.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/chart_curve.png rename to packages/mindplot/assets/icons/chart_curve.png diff --git a/packages/mindplot/test/playground/map-render/icons/chart_line.png b/packages/mindplot/assets/icons/chart_line.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/chart_line.png rename to packages/mindplot/assets/icons/chart_line.png diff --git a/packages/mindplot/test/playground/map-render/icons/chart_organisation.png b/packages/mindplot/assets/icons/chart_organisation.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/chart_organisation.png rename to packages/mindplot/assets/icons/chart_organisation.png diff --git a/packages/mindplot/test/playground/map-render/icons/chart_pie.png b/packages/mindplot/assets/icons/chart_pie.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/chart_pie.png rename to packages/mindplot/assets/icons/chart_pie.png diff --git a/packages/mindplot/test/playground/map-render/icons/close.png b/packages/mindplot/assets/icons/close.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/close.png rename to packages/mindplot/assets/icons/close.png diff --git a/packages/mindplot/test/playground/map-render/icons/conn_connect.png b/packages/mindplot/assets/icons/conn_connect.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/conn_connect.png rename to packages/mindplot/assets/icons/conn_connect.png diff --git a/packages/mindplot/test/playground/map-render/icons/conn_disconnect.png b/packages/mindplot/assets/icons/conn_disconnect.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/conn_disconnect.png rename to packages/mindplot/assets/icons/conn_disconnect.png diff --git a/packages/mindplot/test/playground/map-render/icons/face_crying.png b/packages/mindplot/assets/icons/face_crying.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/face_crying.png rename to packages/mindplot/assets/icons/face_crying.png diff --git a/packages/mindplot/test/playground/map-render/icons/face_plain.png b/packages/mindplot/assets/icons/face_plain.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/face_plain.png rename to packages/mindplot/assets/icons/face_plain.png diff --git a/packages/mindplot/test/playground/map-render/icons/face_sad.png b/packages/mindplot/assets/icons/face_sad.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/face_sad.png rename to packages/mindplot/assets/icons/face_sad.png diff --git a/packages/mindplot/test/playground/map-render/icons/face_smile-big.png b/packages/mindplot/assets/icons/face_smile-big.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/face_smile-big.png rename to packages/mindplot/assets/icons/face_smile-big.png diff --git a/packages/mindplot/test/playground/map-render/icons/face_smile.png b/packages/mindplot/assets/icons/face_smile.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/face_smile.png rename to packages/mindplot/assets/icons/face_smile.png diff --git a/packages/mindplot/test/playground/map-render/icons/face_surprise.png b/packages/mindplot/assets/icons/face_surprise.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/face_surprise.png rename to packages/mindplot/assets/icons/face_surprise.png diff --git a/packages/mindplot/test/playground/map-render/icons/face_wink.png b/packages/mindplot/assets/icons/face_wink.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/face_wink.png rename to packages/mindplot/assets/icons/face_wink.png diff --git a/packages/mindplot/test/playground/map-render/icons/flag_blue.png b/packages/mindplot/assets/icons/flag_blue.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/flag_blue.png rename to packages/mindplot/assets/icons/flag_blue.png diff --git a/packages/mindplot/test/playground/map-render/icons/flag_green.png b/packages/mindplot/assets/icons/flag_green.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/flag_green.png rename to packages/mindplot/assets/icons/flag_green.png diff --git a/packages/mindplot/test/playground/map-render/icons/flag_orange.png b/packages/mindplot/assets/icons/flag_orange.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/flag_orange.png rename to packages/mindplot/assets/icons/flag_orange.png diff --git a/packages/mindplot/test/playground/map-render/icons/flag_pink.png b/packages/mindplot/assets/icons/flag_pink.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/flag_pink.png rename to packages/mindplot/assets/icons/flag_pink.png diff --git a/packages/mindplot/test/playground/map-render/icons/flag_purple.png b/packages/mindplot/assets/icons/flag_purple.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/flag_purple.png rename to packages/mindplot/assets/icons/flag_purple.png diff --git a/packages/mindplot/test/playground/map-render/icons/flag_yellow.png b/packages/mindplot/assets/icons/flag_yellow.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/flag_yellow.png rename to packages/mindplot/assets/icons/flag_yellow.png diff --git a/packages/mindplot/test/playground/map-render/icons/funy_angel.png b/packages/mindplot/assets/icons/funy_angel.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/funy_angel.png rename to packages/mindplot/assets/icons/funy_angel.png diff --git a/packages/mindplot/test/playground/map-render/icons/funy_devilish.png b/packages/mindplot/assets/icons/funy_devilish.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/funy_devilish.png rename to packages/mindplot/assets/icons/funy_devilish.png diff --git a/packages/mindplot/test/playground/map-render/icons/funy_glasses.png b/packages/mindplot/assets/icons/funy_glasses.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/funy_glasses.png rename to packages/mindplot/assets/icons/funy_glasses.png diff --git a/packages/mindplot/test/playground/map-render/icons/funy_grin.png b/packages/mindplot/assets/icons/funy_grin.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/funy_grin.png rename to packages/mindplot/assets/icons/funy_grin.png diff --git a/packages/mindplot/test/playground/map-render/icons/funy_kiss.png b/packages/mindplot/assets/icons/funy_kiss.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/funy_kiss.png rename to packages/mindplot/assets/icons/funy_kiss.png diff --git a/packages/mindplot/test/playground/map-render/icons/funy_monkey.png b/packages/mindplot/assets/icons/funy_monkey.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/funy_monkey.png rename to packages/mindplot/assets/icons/funy_monkey.png diff --git a/packages/mindplot/test/playground/map-render/icons/gener_female.png b/packages/mindplot/assets/icons/gener_female.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/gener_female.png rename to packages/mindplot/assets/icons/gener_female.png diff --git a/packages/mindplot/test/playground/map-render/icons/gener_male.png b/packages/mindplot/assets/icons/gener_male.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/gener_male.png rename to packages/mindplot/assets/icons/gener_male.png diff --git a/packages/mindplot/test/playground/map-render/icons/hard_cd.png b/packages/mindplot/assets/icons/hard_cd.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/hard_cd.png rename to packages/mindplot/assets/icons/hard_cd.png diff --git a/packages/mindplot/test/playground/map-render/icons/hard_computer.png b/packages/mindplot/assets/icons/hard_computer.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/hard_computer.png rename to packages/mindplot/assets/icons/hard_computer.png diff --git a/packages/mindplot/test/playground/map-render/icons/hard_controller.png b/packages/mindplot/assets/icons/hard_controller.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/hard_controller.png rename to packages/mindplot/assets/icons/hard_controller.png diff --git a/packages/mindplot/test/playground/map-render/icons/hard_drive_cd.png b/packages/mindplot/assets/icons/hard_drive_cd.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/hard_drive_cd.png rename to packages/mindplot/assets/icons/hard_drive_cd.png diff --git a/packages/mindplot/test/playground/map-render/icons/hard_driver_disk.png b/packages/mindplot/assets/icons/hard_driver_disk.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/hard_driver_disk.png rename to packages/mindplot/assets/icons/hard_driver_disk.png diff --git a/packages/mindplot/test/playground/map-render/icons/hard_ipod.png b/packages/mindplot/assets/icons/hard_ipod.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/hard_ipod.png rename to packages/mindplot/assets/icons/hard_ipod.png diff --git a/packages/mindplot/test/playground/map-render/icons/hard_keyboard.png b/packages/mindplot/assets/icons/hard_keyboard.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/hard_keyboard.png rename to packages/mindplot/assets/icons/hard_keyboard.png diff --git a/packages/mindplot/test/playground/map-render/icons/hard_mouse.png b/packages/mindplot/assets/icons/hard_mouse.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/hard_mouse.png rename to packages/mindplot/assets/icons/hard_mouse.png diff --git a/packages/mindplot/test/playground/map-render/icons/hard_printer.png b/packages/mindplot/assets/icons/hard_printer.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/hard_printer.png rename to packages/mindplot/assets/icons/hard_printer.png diff --git a/packages/mindplot/test/playground/map-render/icons/lock_close.png b/packages/mindplot/assets/icons/lock_close.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/lock_close.png rename to packages/mindplot/assets/icons/lock_close.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/lock_open.png b/packages/mindplot/assets/icons/lock_open.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/lock_open.png rename to packages/mindplot/assets/icons/lock_open.png diff --git a/packages/mindplot/test/playground/map-render/icons/mail_edit.png b/packages/mindplot/assets/icons/mail_edit.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/mail_edit.png rename to packages/mindplot/assets/icons/mail_edit.png diff --git a/packages/mindplot/test/playground/map-render/icons/mail_envelop.png b/packages/mindplot/assets/icons/mail_envelop.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/mail_envelop.png rename to packages/mindplot/assets/icons/mail_envelop.png diff --git a/packages/mindplot/test/playground/map-render/icons/mail_list.png b/packages/mindplot/assets/icons/mail_list.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/mail_list.png rename to packages/mindplot/assets/icons/mail_list.png diff --git a/packages/mindplot/test/playground/map-render/icons/mail_mailbox.png b/packages/mindplot/assets/icons/mail_mailbox.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/mail_mailbox.png rename to packages/mindplot/assets/icons/mail_mailbox.png diff --git a/packages/mindplot/test/playground/map-render/icons/money_coins.png b/packages/mindplot/assets/icons/money_coins.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/money_coins.png rename to packages/mindplot/assets/icons/money_coins.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/money_dollar.png b/packages/mindplot/assets/icons/money_dollar.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/money_dollar.png rename to packages/mindplot/assets/icons/money_dollar.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/money_euro.png b/packages/mindplot/assets/icons/money_euro.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/money_euro.png rename to packages/mindplot/assets/icons/money_euro.png diff --git a/packages/mindplot/test/playground/map-render/icons/money_money.png b/packages/mindplot/assets/icons/money_money.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/money_money.png rename to packages/mindplot/assets/icons/money_money.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/money_pound.png b/packages/mindplot/assets/icons/money_pound.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/money_pound.png rename to packages/mindplot/assets/icons/money_pound.png diff --git a/packages/mindplot/test/playground/map-render/icons/money_ruby.png b/packages/mindplot/assets/icons/money_ruby.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/money_ruby.png rename to packages/mindplot/assets/icons/money_ruby.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/money_yen.png b/packages/mindplot/assets/icons/money_yen.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/money_yen.png rename to packages/mindplot/assets/icons/money_yen.png diff --git a/packages/mindplot/test/playground/map-render/icons/number_1.png b/packages/mindplot/assets/icons/number_1.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/number_1.png rename to packages/mindplot/assets/icons/number_1.png diff --git a/packages/mindplot/test/playground/map-render/icons/number_2.png b/packages/mindplot/assets/icons/number_2.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/number_2.png rename to packages/mindplot/assets/icons/number_2.png diff --git a/packages/mindplot/test/playground/map-render/icons/number_3.png b/packages/mindplot/assets/icons/number_3.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/number_3.png rename to packages/mindplot/assets/icons/number_3.png diff --git a/packages/mindplot/test/playground/map-render/icons/number_4.png b/packages/mindplot/assets/icons/number_4.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/number_4.png rename to packages/mindplot/assets/icons/number_4.png diff --git a/packages/mindplot/test/playground/map-render/icons/number_5.png b/packages/mindplot/assets/icons/number_5.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/number_5.png rename to packages/mindplot/assets/icons/number_5.png diff --git a/packages/mindplot/test/playground/map-render/icons/number_6.png b/packages/mindplot/assets/icons/number_6.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/number_6.png rename to packages/mindplot/assets/icons/number_6.png diff --git a/packages/mindplot/test/playground/map-render/icons/number_7.png b/packages/mindplot/assets/icons/number_7.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/number_7.png rename to packages/mindplot/assets/icons/number_7.png diff --git a/packages/mindplot/test/playground/map-render/icons/number_8.png b/packages/mindplot/assets/icons/number_8.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/number_8.png rename to packages/mindplot/assets/icons/number_8.png diff --git a/packages/mindplot/test/playground/map-render/icons/number_9.png b/packages/mindplot/assets/icons/number_9.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/number_9.png rename to packages/mindplot/assets/icons/number_9.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_bell.png b/packages/mindplot/assets/icons/object_bell.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_bell.png rename to packages/mindplot/assets/icons/object_bell.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_cake.png b/packages/mindplot/assets/icons/object_cake.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_cake.png rename to packages/mindplot/assets/icons/object_cake.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_camera.png b/packages/mindplot/assets/icons/object_camera.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_camera.png rename to packages/mindplot/assets/icons/object_camera.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_clanbomber.png b/packages/mindplot/assets/icons/object_clanbomber.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_clanbomber.png rename to packages/mindplot/assets/icons/object_clanbomber.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_clip.png b/packages/mindplot/assets/icons/object_clip.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_clip.png rename to packages/mindplot/assets/icons/object_clip.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_house.png b/packages/mindplot/assets/icons/object_house.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_house.png rename to packages/mindplot/assets/icons/object_house.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_key.png b/packages/mindplot/assets/icons/object_key.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_key.png rename to packages/mindplot/assets/icons/object_key.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_magnifier.png b/packages/mindplot/assets/icons/object_magnifier.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_magnifier.png rename to packages/mindplot/assets/icons/object_magnifier.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_music.png b/packages/mindplot/assets/icons/object_music.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_music.png rename to packages/mindplot/assets/icons/object_music.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_palette.png b/packages/mindplot/assets/icons/object_palette.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_palette.png rename to packages/mindplot/assets/icons/object_palette.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_pencil.png b/packages/mindplot/assets/icons/object_pencil.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_pencil.png rename to packages/mindplot/assets/icons/object_pencil.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_phone.png b/packages/mindplot/assets/icons/object_phone.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_phone.png rename to packages/mindplot/assets/icons/object_phone.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_rainbow.png b/packages/mindplot/assets/icons/object_rainbow.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_rainbow.png rename to packages/mindplot/assets/icons/object_rainbow.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_star.png b/packages/mindplot/assets/icons/object_star.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_star.png rename to packages/mindplot/assets/icons/object_star.png diff --git a/packages/mindplot/test/playground/map-render/icons/object_wizard.png b/packages/mindplot/assets/icons/object_wizard.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/object_wizard.png rename to packages/mindplot/assets/icons/object_wizard.png diff --git a/packages/mindplot/test/playground/map-render/icons/onoff_add.png b/packages/mindplot/assets/icons/onoff_add.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/onoff_add.png rename to packages/mindplot/assets/icons/onoff_add.png diff --git a/packages/mindplot/test/playground/map-render/icons/onoff_clock.png b/packages/mindplot/assets/icons/onoff_clock.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/onoff_clock.png rename to packages/mindplot/assets/icons/onoff_clock.png diff --git a/packages/mindplot/test/playground/map-render/icons/onoff_clock_red.png b/packages/mindplot/assets/icons/onoff_clock_red.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/onoff_clock_red.png rename to packages/mindplot/assets/icons/onoff_clock_red.png diff --git a/packages/mindplot/test/playground/map-render/icons/onoff_delete.png b/packages/mindplot/assets/icons/onoff_delete.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/onoff_delete.png rename to packages/mindplot/assets/icons/onoff_delete.png diff --git a/packages/mindplot/test/playground/map-render/icons/onoff_status_offline.png b/packages/mindplot/assets/icons/onoff_status_offline.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/onoff_status_offline.png rename to packages/mindplot/assets/icons/onoff_status_offline.png diff --git a/packages/mindplot/test/playground/map-render/icons/onoff_status_online.png b/packages/mindplot/assets/icons/onoff_status_online.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/onoff_status_online.png rename to packages/mindplot/assets/icons/onoff_status_online.png diff --git a/packages/mindplot/test/playground/map-render/icons/people_female1.png b/packages/mindplot/assets/icons/people_female1.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/people_female1.png rename to packages/mindplot/assets/icons/people_female1.png diff --git a/packages/mindplot/test/playground/map-render/icons/people_female2.png b/packages/mindplot/assets/icons/people_female2.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/people_female2.png rename to packages/mindplot/assets/icons/people_female2.png diff --git a/packages/mindplot/test/playground/map-render/icons/people_group.png b/packages/mindplot/assets/icons/people_group.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/people_group.png rename to packages/mindplot/assets/icons/people_group.png diff --git a/packages/mindplot/test/playground/map-render/icons/people_male1.png b/packages/mindplot/assets/icons/people_male1.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/people_male1.png rename to packages/mindplot/assets/icons/people_male1.png diff --git a/packages/mindplot/test/playground/map-render/icons/people_male2.png b/packages/mindplot/assets/icons/people_male2.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/people_male2.png rename to packages/mindplot/assets/icons/people_male2.png diff --git a/packages/mindplot/test/playground/map-render/icons/sign_cancel.png b/packages/mindplot/assets/icons/sign_cancel.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sign_cancel.png rename to packages/mindplot/assets/icons/sign_cancel.png diff --git a/packages/mindplot/test/playground/map-render/icons/sign_closed.png b/packages/mindplot/assets/icons/sign_closed.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sign_closed.png rename to packages/mindplot/assets/icons/sign_closed.png diff --git a/packages/mindplot/test/playground/map-render/icons/sign_exclamation.png b/packages/mindplot/assets/icons/sign_exclamation.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sign_exclamation.png rename to packages/mindplot/assets/icons/sign_exclamation.png diff --git a/packages/mindplot/test/playground/map-render/icons/sign_help.png b/packages/mindplot/assets/icons/sign_help.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sign_help.png rename to packages/mindplot/assets/icons/sign_help.png diff --git a/packages/mindplot/test/playground/map-render/icons/sign_info.png b/packages/mindplot/assets/icons/sign_info.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sign_info.png rename to packages/mindplot/assets/icons/sign_info.png diff --git a/packages/mindplot/test/playground/map-render/icons/sign_stop.png b/packages/mindplot/assets/icons/sign_stop.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sign_stop.png rename to packages/mindplot/assets/icons/sign_stop.png diff --git a/packages/mindplot/test/playground/map-render/icons/sign_warning.png b/packages/mindplot/assets/icons/sign_warning.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sign_warning.png rename to packages/mindplot/assets/icons/sign_warning.png diff --git a/packages/mindplot/test/playground/map-render/icons/soft_bug.png b/packages/mindplot/assets/icons/soft_bug.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/soft_bug.png rename to packages/mindplot/assets/icons/soft_bug.png diff --git a/packages/mindplot/test/playground/map-render/icons/soft_cursor.png b/packages/mindplot/assets/icons/soft_cursor.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/soft_cursor.png rename to packages/mindplot/assets/icons/soft_cursor.png diff --git a/packages/mindplot/test/playground/map-render/icons/soft_database.png b/packages/mindplot/assets/icons/soft_database.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/soft_database.png rename to packages/mindplot/assets/icons/soft_database.png diff --git a/packages/mindplot/test/playground/map-render/icons/soft_database_table.png b/packages/mindplot/assets/icons/soft_database_table.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/soft_database_table.png rename to packages/mindplot/assets/icons/soft_database_table.png diff --git a/packages/mindplot/test/playground/map-render/icons/soft_feed.png b/packages/mindplot/assets/icons/soft_feed.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/soft_feed.png rename to packages/mindplot/assets/icons/soft_feed.png diff --git a/packages/mindplot/test/playground/map-render/icons/soft_folder_explore.png b/packages/mindplot/assets/icons/soft_folder_explore.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/soft_folder_explore.png rename to packages/mindplot/assets/icons/soft_folder_explore.png diff --git a/packages/mindplot/test/playground/map-render/icons/soft_penguin.png b/packages/mindplot/assets/icons/soft_penguin.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/soft_penguin.png rename to packages/mindplot/assets/icons/soft_penguin.png diff --git a/packages/mindplot/test/playground/map-render/icons/soft_rss.png b/packages/mindplot/assets/icons/soft_rss.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/soft_rss.png rename to packages/mindplot/assets/icons/soft_rss.png diff --git a/packages/mindplot/test/playground/map-render/icons/soft_stuff_folder.png b/packages/mindplot/assets/icons/soft_stuff_folder.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/soft_stuff_folder.png rename to packages/mindplot/assets/icons/soft_stuff_folder.png diff --git a/packages/mindplot/test/playground/map-render/icons/sport_basketball.png b/packages/mindplot/assets/icons/sport_basketball.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sport_basketball.png rename to packages/mindplot/assets/icons/sport_basketball.png diff --git a/packages/mindplot/test/playground/map-render/icons/sport_football.png b/packages/mindplot/assets/icons/sport_football.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sport_football.png rename to packages/mindplot/assets/icons/sport_football.png diff --git a/packages/mindplot/test/playground/map-render/icons/sport_golf.png b/packages/mindplot/assets/icons/sport_golf.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sport_golf.png rename to packages/mindplot/assets/icons/sport_golf.png diff --git a/packages/mindplot/test/playground/map-render/icons/sport_raquet.png b/packages/mindplot/assets/icons/sport_raquet.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sport_raquet.png rename to packages/mindplot/assets/icons/sport_raquet.png diff --git a/packages/mindplot/test/playground/map-render/icons/sport_shuttlecock.png b/packages/mindplot/assets/icons/sport_shuttlecock.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sport_shuttlecock.png rename to packages/mindplot/assets/icons/sport_shuttlecock.png diff --git a/packages/mindplot/test/playground/map-render/icons/sport_soccer.png b/packages/mindplot/assets/icons/sport_soccer.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sport_soccer.png rename to packages/mindplot/assets/icons/sport_soccer.png diff --git a/packages/mindplot/test/playground/map-render/icons/sport_tennis.png b/packages/mindplot/assets/icons/sport_tennis.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/sport_tennis.png rename to packages/mindplot/assets/icons/sport_tennis.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/tag_blue.png b/packages/mindplot/assets/icons/tag_blue.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/tag_blue.png rename to packages/mindplot/assets/icons/tag_blue.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/tag_blue_add.png b/packages/mindplot/assets/icons/tag_blue_add.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/tag_blue_add.png rename to packages/mindplot/assets/icons/tag_blue_add.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/tag_blue_add2.png b/packages/mindplot/assets/icons/tag_blue_add2.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/tag_blue_add2.png rename to packages/mindplot/assets/icons/tag_blue_add2.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/tag_green.png b/packages/mindplot/assets/icons/tag_green.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/tag_green.png rename to packages/mindplot/assets/icons/tag_green.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/tag_orange.png b/packages/mindplot/assets/icons/tag_orange.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/tag_orange.png rename to packages/mindplot/assets/icons/tag_orange.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/tag_pink.png b/packages/mindplot/assets/icons/tag_pink.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/tag_pink.png rename to packages/mindplot/assets/icons/tag_pink.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/tag_purple.png b/packages/mindplot/assets/icons/tag_purple.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/tag_purple.png rename to packages/mindplot/assets/icons/tag_purple.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/tag_red.png b/packages/mindplot/assets/icons/tag_red.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/tag_red.png rename to packages/mindplot/assets/icons/tag_red.png diff --git a/packages/mindplot/test/playground/map-render/icons/legacy/tag_yellow.png b/packages/mindplot/assets/icons/tag_yellow.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/legacy/tag_yellow.png rename to packages/mindplot/assets/icons/tag_yellow.png diff --git a/packages/mindplot/test/playground/map-render/icons/task_0.png b/packages/mindplot/assets/icons/task_0.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/task_0.png rename to packages/mindplot/assets/icons/task_0.png diff --git a/packages/mindplot/test/playground/map-render/icons/task_100.png b/packages/mindplot/assets/icons/task_100.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/task_100.png rename to packages/mindplot/assets/icons/task_100.png diff --git a/packages/mindplot/test/playground/map-render/icons/task_25.png b/packages/mindplot/assets/icons/task_25.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/task_25.png rename to packages/mindplot/assets/icons/task_25.png diff --git a/packages/mindplot/test/playground/map-render/icons/task_50.png b/packages/mindplot/assets/icons/task_50.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/task_50.png rename to packages/mindplot/assets/icons/task_50.png diff --git a/packages/mindplot/test/playground/map-render/icons/task_75.png b/packages/mindplot/assets/icons/task_75.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/task_75.png rename to packages/mindplot/assets/icons/task_75.png diff --git a/packages/mindplot/test/playground/map-render/icons/thumb_thumb_down.png b/packages/mindplot/assets/icons/thumb_thumb_down.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/thumb_thumb_down.png rename to packages/mindplot/assets/icons/thumb_thumb_down.png diff --git a/packages/mindplot/test/playground/map-render/icons/thumb_thumb_up.png b/packages/mindplot/assets/icons/thumb_thumb_up.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/thumb_thumb_up.png rename to packages/mindplot/assets/icons/thumb_thumb_up.png diff --git a/packages/mindplot/test/playground/map-render/icons/tick_cross.png b/packages/mindplot/assets/icons/tick_cross.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/tick_cross.png rename to packages/mindplot/assets/icons/tick_cross.png diff --git a/packages/mindplot/test/playground/map-render/icons/tick_tick.png b/packages/mindplot/assets/icons/tick_tick.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/tick_tick.png rename to packages/mindplot/assets/icons/tick_tick.png diff --git a/packages/mindplot/test/playground/map-render/icons/time_calendar.png b/packages/mindplot/assets/icons/time_calendar.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/time_calendar.png rename to packages/mindplot/assets/icons/time_calendar.png diff --git a/packages/mindplot/test/playground/map-render/icons/time_clock.png b/packages/mindplot/assets/icons/time_clock.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/time_clock.png rename to packages/mindplot/assets/icons/time_clock.png diff --git a/packages/mindplot/test/playground/map-render/icons/time_hourglass.png b/packages/mindplot/assets/icons/time_hourglass.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/time_hourglass.png rename to packages/mindplot/assets/icons/time_hourglass.png diff --git a/packages/mindplot/test/playground/map-render/icons/weather_clear-night.png b/packages/mindplot/assets/icons/weather_clear-night.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/weather_clear-night.png rename to packages/mindplot/assets/icons/weather_clear-night.png diff --git a/packages/mindplot/test/playground/map-render/icons/weather_clear.png b/packages/mindplot/assets/icons/weather_clear.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/weather_clear.png rename to packages/mindplot/assets/icons/weather_clear.png diff --git a/packages/mindplot/test/playground/map-render/icons/weather_few-clouds-night.png b/packages/mindplot/assets/icons/weather_few-clouds-night.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/weather_few-clouds-night.png rename to packages/mindplot/assets/icons/weather_few-clouds-night.png diff --git a/packages/mindplot/test/playground/map-render/icons/weather_few-clouds.png b/packages/mindplot/assets/icons/weather_few-clouds.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/weather_few-clouds.png rename to packages/mindplot/assets/icons/weather_few-clouds.png diff --git a/packages/mindplot/test/playground/map-render/icons/weather_overcast.png b/packages/mindplot/assets/icons/weather_overcast.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/weather_overcast.png rename to packages/mindplot/assets/icons/weather_overcast.png diff --git a/packages/mindplot/test/playground/map-render/icons/weather_severe-alert.png b/packages/mindplot/assets/icons/weather_severe-alert.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/weather_severe-alert.png rename to packages/mindplot/assets/icons/weather_severe-alert.png diff --git a/packages/mindplot/test/playground/map-render/icons/weather_showers-scattered.png b/packages/mindplot/assets/icons/weather_showers-scattered.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/weather_showers-scattered.png rename to packages/mindplot/assets/icons/weather_showers-scattered.png diff --git a/packages/mindplot/test/playground/map-render/icons/weather_showers.png b/packages/mindplot/assets/icons/weather_showers.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/weather_showers.png rename to packages/mindplot/assets/icons/weather_showers.png diff --git a/packages/mindplot/test/playground/map-render/icons/weather_snow.png b/packages/mindplot/assets/icons/weather_snow.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/weather_snow.png rename to packages/mindplot/assets/icons/weather_snow.png diff --git a/packages/mindplot/test/playground/map-render/icons/weather_storm.png b/packages/mindplot/assets/icons/weather_storm.png similarity index 100% rename from packages/mindplot/test/playground/map-render/icons/weather_storm.png rename to packages/mindplot/assets/icons/weather_storm.png diff --git a/packages/mindplot/test/playground/map-render/images/alert-sign.png b/packages/mindplot/assets/images/alert-sign.png similarity index 100% rename from packages/mindplot/test/playground/map-render/images/alert-sign.png rename to packages/mindplot/assets/images/alert-sign.png diff --git a/packages/mindplot/test/playground/map-render/images/editortoolbar.png b/packages/mindplot/assets/images/editortoolbar.png similarity index 100% rename from packages/mindplot/test/playground/map-render/images/editortoolbar.png rename to packages/mindplot/assets/images/editortoolbar.png diff --git a/packages/mindplot/test/playground/map-render/images/links.png b/packages/mindplot/assets/images/links.png similarity index 100% rename from packages/mindplot/test/playground/map-render/images/links.png rename to packages/mindplot/assets/images/links.png diff --git a/packages/mindplot/test/playground/map-render/images/notes.png b/packages/mindplot/assets/images/notes.png similarity index 100% rename from packages/mindplot/test/playground/map-render/images/notes.png rename to packages/mindplot/assets/images/notes.png diff --git a/packages/mindplot/test/playground/map-render/images/shape-circle.png b/packages/mindplot/assets/images/shape-circle.png similarity index 100% rename from packages/mindplot/test/playground/map-render/images/shape-circle.png rename to packages/mindplot/assets/images/shape-circle.png diff --git a/packages/mindplot/test/playground/map-render/images/shape-line.png b/packages/mindplot/assets/images/shape-line.png similarity index 100% rename from packages/mindplot/test/playground/map-render/images/shape-line.png rename to packages/mindplot/assets/images/shape-line.png diff --git a/packages/mindplot/test/playground/map-render/images/shape-rectangle-round.png b/packages/mindplot/assets/images/shape-rectangle-round.png similarity index 100% rename from packages/mindplot/test/playground/map-render/images/shape-rectangle-round.png rename to packages/mindplot/assets/images/shape-rectangle-round.png diff --git a/packages/mindplot/test/playground/map-render/images/shape-rectangle.png b/packages/mindplot/assets/images/shape-rectangle.png similarity index 100% rename from packages/mindplot/test/playground/map-render/images/shape-rectangle.png rename to packages/mindplot/assets/images/shape-rectangle.png diff --git a/packages/mindplot/src/components/ImageIcon.js b/packages/mindplot/src/components/ImageIcon.js index 70b85844..a75a4f6f 100644 --- a/packages/mindplot/src/components/ImageIcon.js +++ b/packages/mindplot/src/components/ImageIcon.js @@ -19,6 +19,14 @@ import { $assert } from '@wisemapping/core-js'; import Icon from './Icon'; import ActionDispatcher from './ActionDispatcher'; +function importAll(r) { + const images = {}; + r.keys().forEach((item) => { images[item.replace('./', '')] = r(item); }); + return images; +} + +const images = importAll(require.context('../../assets/icons', false, /\.png$/)); + class ImageIcon extends Icon { constructor(topic, iconModel, readOnly) { $assert(iconModel, 'iconModel can not be null'); @@ -48,7 +56,7 @@ class ImageIcon extends Icon { } static _getImageUrl(iconId) { - return `icons/${iconId}.png`; + return images[`${iconId}.png`]; } getModel() { diff --git a/packages/mindplot/src/components/LinkIcon.js b/packages/mindplot/src/components/LinkIcon.js index d1ad72eb..ce2bf9cf 100644 --- a/packages/mindplot/src/components/LinkIcon.js +++ b/packages/mindplot/src/components/LinkIcon.js @@ -19,6 +19,7 @@ import { $assert } from '@wisemapping/core-js'; import $ from 'jquery'; import Icon from './Icon'; import LinkIconTooltip from './widget/LinkIconTooltip'; +import LinksImage from '../../assets/images/links.png'; class LinkIcon extends Icon { constructor(topic, linkModel, readOnly) { @@ -65,6 +66,6 @@ class LinkIcon extends Icon { return this._linksModel; } } -LinkIcon.IMAGE_URL = 'images/links.png'; +LinkIcon.IMAGE_URL = LinksImage; export default LinkIcon; diff --git a/packages/mindplot/src/components/NoteIcon.js b/packages/mindplot/src/components/NoteIcon.js index 3fa9ecca..ac29a708 100644 --- a/packages/mindplot/src/components/NoteIcon.js +++ b/packages/mindplot/src/components/NoteIcon.js @@ -20,6 +20,7 @@ import $ from 'jquery'; import { $msg } from './Messages'; import Icon from './Icon'; import FloatingTip from './widget/FloatingTip'; +import NotesImage from '../../assets/images/notes.png'; class NoteIcon extends Icon { constructor(topic, noteModel, readOnly) { @@ -79,6 +80,6 @@ class NoteIcon extends Icon { } } -NoteIcon.IMAGE_URL = 'images/notes.png'; +NoteIcon.IMAGE_URL = NotesImage; export default NoteIcon; diff --git a/packages/mindplot/src/components/widget/ColorPaletteHtml.js b/packages/mindplot/src/components/widget/ColorPaletteHtml.js new file mode 100644 index 00000000..4c7e9fd7 --- /dev/null +++ b/packages/mindplot/src/components/widget/ColorPaletteHtml.js @@ -0,0 +1,135 @@ +import EditorImage from '../../../assets/images/editortoolbar.png'; + +export const css = ` +.palette-panel { + cursor: default; + font: normal 13px "Helvetica Neue", Helvetica, Arial, sans-serif; + margin: 0; + outline: none; + padding: 4px 0; + z-index: 20000; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.palette { + cursor: default; + outline: none; +} + +.palette-table { + border: 1px solid #666; + border-collapse: collapse; + margin: 5px; +} + +tbody { + display: table-row-group; + vertical-align: middle; + border-color: inherit; +} + +.palette-table { + border-collapse: collapse; +} + +tr { + display: table-row; + vertical-align: inherit; + border-color: inherit; +} + +.palette-cell { + border: 0; + border-right: 1px solid #666; + cursor: pointer; + height: 18px; + margin: 0; + text-align: center; + vertical-align: middle; + width: 18px; +} + +.palette-cell .palette-colorswatch { + border: none; + font-size: x-small; + height: 18px; + position: relative; + width: 18px; +} + +.palette-cell-selected .palette-colorswatch { + background: url(${EditorImage}) no-repeat -368px 0; + border: 1px solid #333; + color: white; + font-weight: bold; + height: 16px; + width: 16px; +} + +.palette-colorswatch:hover { + border: 1px solid white; + height: 16px; + width: 16px; +} +`; + +export const cell = (color) => ` +
+`; + +export const row = (colors) => ` + + ${colors.map((c) => cell(c)).join('\n')} + +`; + +export const palette = (rows, id) => ` +
+ + + ${rows.map((r) => row(r)).join('\n')} + +
+
+ `; + +export const buildHtml = () => { + const palettes = [ + { + id: ':3p', + colors: [['(0, 0, 0)', '(68, 68, 68)', '(102, 102, 102)', '(153, 153, 153)', '(204, 204, 204)', '(238, 238, 238)', '(243, 243, 243)', '(254, 255, 255)']], + }, + { + id: '3q', + colors: [['(255, 0, 0)', '(255, 153, 0)', '(255, 255, 0)', '(0, 255, 0)', '(0, 255, 255)', '(0, 0, 255)', '(153, 0, 255)', '(255, 0, 255)']], + }, + { + id: '3r', + colors: [ + ['(244, 204, 204)', '(252, 229, 205)', '(255, 242, 204)', '(217, 234, 211)', '(208, 224, 227)', '(207, 226, 243)', '(217, 210, 233)', '(234, 209, 220)'], + ['(234, 153, 153)', '(249, 203, 156)', '(255, 229, 153)', '(182, 215, 168)', '(162, 196, 201)', '(159, 197, 232)', '(180, 167, 214)', '(213, 166, 189)'], + ['(224, 102, 102)', '(246, 178, 107)', '(255, 217, 102)', '(147, 196, 125)', '(118, 165, 175)', '(111, 168, 220)', '(142, 124, 195)', '(194, 123, 160)'], + ['(204, 0, 0)', '(230, 145, 56)', '(241, 194, 50)', '(106, 168, 79)', '(69, 129, 142)', '(61, 133, 198)', '(103, 78, 167)', '(166, 77, 121)'], + ['(153, 0, 0)', '(180, 95, 6)', '(191, 144, 0)', '(56, 118, 29)', '(19, 79, 92)', '(11, 83, 148)', '(53, 28, 117)', '(116, 27, 71)'], + ['(102, 0, 0)', '(120, 63, 4)', '(127, 96, 0)', '(39, 78, 19)', '(12, 52, 61)', '(7, 55, 99)', '(32, 18, 77)', '(76, 17, 48)'], + ], + }, + { + id: '2p', + colors: [['(255, 255, 255)', '(224, 229, 239)', '(80, 157, 192)', '(57, 113, 177)', '(2, 59, 185)', '(244, 184, 45)', '(241, 163, 39)', '(82, 92, 97)']], + }, + ]; + + return ``; +}; diff --git a/packages/mindplot/src/components/widget/ColorPalettePanel.js b/packages/mindplot/src/components/widget/ColorPalettePanel.js index 951ddd37..0198b00b 100644 --- a/packages/mindplot/src/components/widget/ColorPalettePanel.js +++ b/packages/mindplot/src/components/widget/ColorPalettePanel.js @@ -18,6 +18,7 @@ import $ from 'jquery'; import { $assert, $defined } from '@wisemapping/core-js'; import ToolbarPaneItem from './ToolbarPaneItem'; +import { buildHtml, css } from './ColorPaletteHtml'; // rgbToHex implementation from https://stackoverflow.com/a/3627747/58128 export const rgb2hex = (rgb) => `#${ @@ -37,26 +38,12 @@ class ColorPalettePanel extends ToolbarPaneItem { _load() { if (!ColorPalettePanel._panelContent) { // Load all the CSS styles ... - $('') + $('