{"id":457969,"date":"2025-04-29T09:28:17","date_gmt":"2025-04-29T09:28:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=457969"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=457969","title":{"rendered":"<span>\u041a\u0430\u043a \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0432\u044f\u0437\u0435\u0439 \u0432 ER-\u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0435 \u043d\u0430 Angular<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d16\/8a7\/dd0\/d168a7dd01bfad1313418ed73893b82c.png\" width=\"780\" height=\"440\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d16\/8a7\/dd0\/d168a7dd01bfad1313418ed73893b82c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d16\/8a7\/dd0\/d168a7dd01bfad1313418ed73893b82c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<blockquote>\n<p>\u041b\u044e\u0434\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0442\u0435\u0445, \u043a\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430 \u0441\u043b\u0443\u0445, \u0438\u00a0\u0442\u0435\u0445, \u043a\u0442\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u0443\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0435\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e. \u0412 \u043c\u0438\u0440\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e, \u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/blockquote>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0418\u043b\u044c\u044f \u0427\u0443\u0431\u043a\u043e, \u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 \u0432 <a href=\"https:\/\/k2.tech\/?utm_source=habr&amp;utm_medium=referral&amp;utm_campaign=statya&amp;utm_content=&amp;utm_term=statya\"><strong>\u041a2\u0422\u0435\u0445<\/strong><\/a>. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 <strong>\u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e ER-\u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u043d\u0430 Angular<\/strong> \u2014 \u043e\u0442 \u043f\u0435\u0440\u0432\u044b\u0445 \u043d\u0430\u0431\u0440\u043e\u0441\u043a\u043e\u0432 \u0434\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0441 \u0430\u043a\u0446\u0435\u043d\u0442\u043e\u043c \u043d\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<h2>\ud83c\udfaf \u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0441\u0432\u044f\u0437\u0435\u0439, \u0432\u0430\u0436\u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u044d\u0442\u043e \u0432 \u0432\u0438\u0434\u0435 JSON \u0438\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c <strong>\u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/strong> \u2014 \u0441 \u043b\u0438\u043d\u0438\u044f\u043c\u0438, \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u043e\u0439, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0432\u044f\u0437\u0438 \u0438 \u0432\u0438\u0434\u0435\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442.<\/p>\n<p>\u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e, \u0435\u0441\u043b\u0438:<\/p>\n<ul>\n<li>\n<p>\u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u2014 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0432\u044f\u0437\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0430, \u0430\u043d\u0430\u043b\u0438\u0437 \u0438\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b.<\/p>\n<h2>\ud83e\uddf1 \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 ER-\u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430<\/h2>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u0434\u0435\u043b\u0451\u043d \u043d\u0430 \u0442\u0440\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u044f:<\/p>\n<h3>1. \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u0435, \u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b:<\/p>\n<pre><code class=\"typescript\">export interface NodeItem {   id: Guid;   name: string;   position: { x: number; y: number };   columns: NodeColumn[]; }  export interface Edge {   id: Guid;   sourceId: Guid;   targetId: Guid; } <\/code><\/pre>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c (NodeItem) \u0438\u043c\u0435\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b, \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438 \u0438\u043c\u044f.<br \/>\u0421\u0432\u044f\u0437\u0438 (Edge) \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442, \u043e\u0442\u043a\u0443\u0434\u0430 \u0438 \u043a\u0443\u0434\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u043b\u0438\u043d\u0438\u044f \u2014 \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u0430 \u0434\u043b\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u043a\u0440\u0438\u0432\u044b\u0445.<\/p>\n<h3>2. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h3>\n<p>\u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438: <strong>Angular<\/strong>, <strong>TailwindCSS<\/strong>, <strong>NgRx Signals<\/strong><br \/>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b:<\/p>\n<ul>\n<li>\n<p><strong>\u0425\u043e\u043b\u0441\u0442<\/strong> \u2014 \u0437\u043e\u043d\u0430 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (svg \u0438\u043b\u0438 canvas, \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 SVG \u0434\u043b\u044f \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438);<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u043a\u043d\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432<\/strong> \u2014 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439, \u0441\u0432\u044f\u0437\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/strong> \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0441\u0432\u044f\u0437\u0435\u0439, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0445\u0435\u043c\u044b;<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043a\u043d\u0430<\/strong> \u2014 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f, \u0432\u044b\u0431\u043e\u0440 \u0442\u0438\u043f\u0430 \u0441\u0432\u044f\u0437\u0438 \u0438 \u0442.\u043f.;<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u0435\u043d\u044e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439<\/strong> \u2014 context-menu \u043f\u043e \u043a\u043b\u0438\u043a\u0443: <strong>\u00ab<\/strong>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0435<strong>\u00bb<\/strong>, <strong>\u00ab<\/strong>\u0423\u0434\u0430\u043b\u0438\u0442\u044c<strong>\u00bb<\/strong> \u0438 \u0442.\u0434.<\/p>\n<\/li>\n<\/ul>\n<h3>3. \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/h3>\n<p>\u041c\u044b \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043b\u0438 UX \u0434\u043b\u044f ER-\u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438 \u0431\u044b\u043b\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439: <\/p>\n<ul>\n<li>\n<p><strong>Drag&amp;Drop \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439<\/strong> \u2014 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 canvas;<\/p>\n<\/li>\n<li>\n<p><strong>Drag&amp;Drop \u043f\u043e\u043b\u0435\u0439<\/strong> \u2014 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442;<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/strong> \u2014 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u043f\u043e\u043b\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0430\u043d\u043e\u0440\u0430\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0445\u043e\u043b\u0441\u0442\u0430<\/strong> \u2014 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u044b\u0448\u0438.<\/p>\n<\/li>\n<\/ul>\n<h2>\ud83e\udde9 \u041e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u0441\u0432\u044f\u0437\u0435\u0439: \u043b\u0438\u043d\u0438\u0438, \u0434\u0443\u0433\u0438, \u043a\u0440\u0438\u0432\u044b\u0435<\/h2>\n<p>\u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u043c\u0438 \u043a \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0435:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u044f\u043c\u044b\u0435 \u043b\u0438\u043d\u0438\u0438 \u2014 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0436\u0451\u0441\u0442\u043a\u043e \u0438 \u043d\u0435\u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043b\u043e\u043c\u0430\u043d\u044b\u0435 \u043b\u0438\u043d\u0438\u0438 \u2014 \u0443\u0436\u0435 \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u044e\u0442 \u0445\u043e\u043b\u0441\u0442;<\/p>\n<\/li>\n<li>\n<p>\u0434\u0443\u0433\u0438 \u2014 \u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u0438.<\/p>\n<\/li>\n<\/ul>\n<h4>\ud83d\udca1 \u041a\u0440\u0438\u0432\u044b\u0435 \u0411\u0435\u0437\u044c\u0435 \u2014 \u043d\u0430\u0448 \u0432\u044b\u0431\u043e\u0440<\/h4>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443:<\/p>\n<ul>\n<li>\n<p>\u0433\u043b\u0430\u0434\u043a\u0438\u0435 \u0438\u0437\u0433\u0438\u0431\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043a \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 SVG path.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 SVG Path:<\/p>\n<pre><code>M 660 450 S 760 450 880 350 S 1100 250, 1100 250<\/code><\/pre>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/953\/6cd\/f6c\/9536cdf6cd31db00dcb08f34e2ca0a9c.png\" alt=\"\u041a\u0440\u0438\u0432\u0430\u044f \u0431\u0435\u0437\u044c\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c Smooth\" title=\"\u041a\u0440\u0438\u0432\u0430\u044f \u0431\u0435\u0437\u044c\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c Smooth\" width=\"829\" height=\"435\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/953\/6cd\/f6c\/9536cdf6cd31db00dcb08f34e2ca0a9c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/953\/6cd\/f6c\/9536cdf6cd31db00dcb08f34e2ca0a9c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041a\u0440\u0438\u0432\u0430\u044f \u0431\u0435\u0437\u044c\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c Smooth<\/figcaption><\/div>\n<\/figure>\n<p>\ud83d\udd17 \u0423\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 SVG Path &#8212; <a href=\"https:\/\/svg-path-visualizer.netlify.app\">svg-path-visualizer<\/a><\/p>\n<p>\u0421\u0432\u044f\u0437\u044c \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043a\u0440\u0438\u0432\u0430\u044f \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 svg path<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">&lt;svg class=\"absolute w-full h-full pointer-events-none\"&gt;     &lt;defs&gt;         &lt;marker             id=\"arrow\"             viewBox=\"0 0 10 10\"             refX=\"10\"             refY=\"5\"             markerWidth=\"6\"             markerHeight=\"6\"             orient=\"auto-start-reverse\"         &gt;             &lt;path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"green\"&gt;&lt;\/path&gt;         &lt;\/marker&gt;     &lt;\/defs&gt;      &lt;path         [attr.d]=\"path()\"         [attr.stroke-width]=\"2.0\"         [attr.stroke]=\"lineColor\"         fill=\"none\"         marker-end=\"url(#arrow)\"     &gt;&lt;\/path&gt;      &lt;circle         [attr.cx]=\"sourceX()\"         [attr.cy]=\"sourceY()\"         r=\"5\"         fill=\"green\"     &gt;&lt;\/circle&gt; &lt;\/svg&gt;<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443, \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043a \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c \u0447\u0435\u0440\u0435\u0437 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443:<\/p>\n<h2>\ud83d\ude24 \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/h2>\n<ul>\n<li>\n<p><strong>\u0418\u0437\u0433\u0438\u0431\u044b \u00ab\u0443\u0445\u043e\u0434\u044f\u0442\u00bb<\/strong> \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u2014 \u0440\u0435\u0448\u0438\u043b\u0438, \u0441\u043c\u0435\u0449\u0430\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0437\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442;<\/p>\n<\/li>\n<li>\n<p><strong>SVG \u0432 Angular<\/strong> \u2014 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e path \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441;<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0438\u0439<\/strong> \u2014 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0440\u0435\u0448\u0435\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u0434\u0443\u043c\u0430\u0435\u043c \u043d\u0430\u0434 auto-routing.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043a\u0435\u0439\u0441\u043e\u0432, \u043a\u043e\u0433\u0434\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u0433\u0438\u0431\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c SVG Path \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c:<\/p>\n<pre><code>M 500 450 S 400 450 400 320.5 S 618 191, 618 191<\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/297\/5dd\/9f1\/2975dd9f16f21bc2a554511399e73bd8.png\" alt=\"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a\" title=\"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a\" width=\"509\" height=\"488\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/297\/5dd\/9f1\/2975dd9f16f21bc2a554511399e73bd8.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/297\/5dd\/9f1\/2975dd9f16f21bc2a554511399e73bd8.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a<\/figcaption><\/div>\n<\/figure>\n<p> \u041d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0438\u0436\u0435:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/661\/e52\/e43\/661e52e43273611c9646783c59d4c372.gif\" alt=\"\u041f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u043b\u0438\u043d\u0438\u0439 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432\" title=\"\u041f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u043b\u0438\u043d\u0438\u0439 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432\" width=\"1309\" height=\"827\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/661\/e52\/e43\/661e52e43273611c9646783c59d4c372.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/661\/e52\/e43\/661e52e43273611c9646783c59d4c372.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u043b\u0438\u043d\u0438\u0439 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<h2>\ud83d\udcbe \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0445\u0435\u043c\u044b<\/h2>\n<p>\u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f NgRx Signals. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b common.store.ts.<\/p>\n<details class=\"spoiler\">\n<summary>common.store.ts<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { signalStore, withMethods } from '@ngrx\/signals'; import { withNodes } from '.\/nodes.feature'; import { withEdges } from '.\/edges.feature';  export const CommonStore = signalStore( { providedIn: 'root' }, withNodes(), withEdges(), withMethods((store) =&amp;gt; ({})), ); <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043b\u0438\u043d\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b\u044b nodes.feature.ts \u0438 edges.feature.ts \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e<\/p>\n<details class=\"spoiler\">\n<summary>nodes.feature.ts<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { patchState, signalStoreFeature, type, withMethods, } from '@ngrx\/signals'; import { SelectEntityId, setAllEntities, updateEntity, withEntities, } from '@ngrx\/signals\/entities'; import { NodeItem } from '..\/model\/node-item.interface'; import { Guid } from 'guid-typescript';  const selectId: SelectEntityId = (item) =&gt; item.id.toString();  export function withNodes() { return signalStoreFeature( withEntities({ entity: type(), collection: 'nodes', }), withMethods((store) =&gt; ({ setNodes(nodes: NodeItem[]) { patchState( store, setAllEntities(nodes, { collection: 'nodes', selectId }), ); },  getNodeById(id: Guid) { return store.nodesEntities().find((node) =&gt; node.id === id); },  updateNodePosition( id: Guid, position: { x: number; y: number }, ): void { patchState( store, updateEntity( { id: id.toString(), changes: () =&gt; ({ position: { ...position } }), }, { collection: 'nodes', selectId }, ), ); }, })), ); } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>edges.feature.ts<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { patchState, signalStoreFeature, type, withMethods, } from '@ngrx\/signals'; import { SelectEntityId, setAllEntities, withEntities, } from '@ngrx\/signals\/entities'; import { Guid } from 'guid-typescript';  export interface Edge { id: Guid; sourceId: Guid; targetId: Guid; }  const selectId: SelectEntityId = (item) =&gt; item.id.toString();  export function withEdges() { return signalStoreFeature( withEntities({ entity: type(), collection: 'edges', }), withMethods((store) =&gt; ({ setEdges(edges: Edge[]) { patchState( store, setAllEntities(edges, { collection: 'edges', selectId }) ); } })), ); } <\/code><\/pre>\n<\/div>\n<\/details>\n<h2>\u2705 \u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>Angular \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u2014 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 SVG \u0438 signals. \u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u2014 \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u0418 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0435\u0433\u043e <strong>\u00ab<\/strong>\u0434\u043b\u044f \u0441\u0435\u0431\u044f<strong>\u00bb<\/strong>, \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c.<\/p>\n<figure class=\"bordered full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ed6\/337\/765\/ed63377653114b3a3b726c378b18c045.png\" width=\"1574\" height=\"1039\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ed6\/337\/765\/ed63377653114b3a3b726c378b18c045.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ed6\/337\/765\/ed63377653114b3a3b726c378b18c045.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<div class=\"floating-image\">\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 ER-\u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/chubkoiv.github.io\/ng-erdesigner-example\">\u0437\u0434\u0435\u0441\u044c<\/a>.<br \/>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043b\u0438\u043d\u0438\u0439 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/chubkoiv\/ng-erdesigner-example.git\">github<\/a>, <a href=\"https:\/\/stackblitz.com\/~\/github.com\/chubkoiv\/ng-erdesigner-example\">stackblitz<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/897284\/\"> https:\/\/habr.com\/ru\/articles\/897284\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<blockquote>\n<p>\u041b\u044e\u0434\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0442\u0435\u0445, \u043a\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430 \u0441\u043b\u0443\u0445, \u0438\u00a0\u0442\u0435\u0445, \u043a\u0442\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u0443\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0435\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e. \u0412 \u043c\u0438\u0440\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e, \u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/blockquote>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0418\u043b\u044c\u044f \u0427\u0443\u0431\u043a\u043e, \u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 \u0432 <a href=\"https:\/\/k2.tech\/?utm_source=habr&amp;utm_medium=referral&amp;utm_campaign=statya&amp;utm_content=&amp;utm_term=statya\"><strong>\u041a2\u0422\u0435\u0445<\/strong><\/a>. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 <strong>\u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e ER-\u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u043d\u0430 Angular<\/strong> \u2014 \u043e\u0442 \u043f\u0435\u0440\u0432\u044b\u0445 \u043d\u0430\u0431\u0440\u043e\u0441\u043a\u043e\u0432 \u0434\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0441 \u0430\u043a\u0446\u0435\u043d\u0442\u043e\u043c \u043d\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<h2>\ud83c\udfaf \u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0441\u0432\u044f\u0437\u0435\u0439, \u0432\u0430\u0436\u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u044d\u0442\u043e \u0432 \u0432\u0438\u0434\u0435 JSON \u0438\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c <strong>\u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/strong> \u2014 \u0441 \u043b\u0438\u043d\u0438\u044f\u043c\u0438, \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u043e\u0439, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0432\u044f\u0437\u0438 \u0438 \u0432\u0438\u0434\u0435\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442.<\/p>\n<p>\u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e, \u0435\u0441\u043b\u0438:<\/p>\n<ul>\n<li>\n<p>\u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u2014 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0432\u044f\u0437\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0430, \u0430\u043d\u0430\u043b\u0438\u0437 \u0438\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b.<\/p>\n<h2>\ud83e\uddf1 \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 ER-\u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430<\/h2>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u0434\u0435\u043b\u0451\u043d \u043d\u0430 \u0442\u0440\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0441\u043b\u043e\u044f:<\/p>\n<h3>1. \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u0435, \u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b:<\/p>\n<pre><code class=\"typescript\">export interface NodeItem {   id: Guid;   name: string;   position: { x: number; y: number };   columns: NodeColumn[]; }  export interface Edge {   id: Guid;   sourceId: Guid;   targetId: Guid; } <\/code><\/pre>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c (NodeItem) \u0438\u043c\u0435\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b, \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438 \u0438\u043c\u044f.<br \/>\u0421\u0432\u044f\u0437\u0438 (Edge) \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442, \u043e\u0442\u043a\u0443\u0434\u0430 \u0438 \u043a\u0443\u0434\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u043b\u0438\u043d\u0438\u044f \u2014 \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u0430 \u0434\u043b\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u043a\u0440\u0438\u0432\u044b\u0445.<\/p>\n<h3>2. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h3>\n<p>\u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438: <strong>Angular<\/strong>, <strong>TailwindCSS<\/strong>, <strong>NgRx Signals<\/strong><br \/>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b:<\/p>\n<ul>\n<li>\n<p><strong>\u0425\u043e\u043b\u0441\u0442<\/strong> \u2014 \u0437\u043e\u043d\u0430 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f (svg \u0438\u043b\u0438 canvas, \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 SVG \u0434\u043b\u044f \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438);<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u043a\u043d\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432<\/strong> \u2014 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439, \u0441\u0432\u044f\u0437\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/strong> \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0441\u0432\u044f\u0437\u0435\u0439, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0445\u0435\u043c\u044b;<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043a\u043d\u0430<\/strong> \u2014 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f, \u0432\u044b\u0431\u043e\u0440 \u0442\u0438\u043f\u0430 \u0441\u0432\u044f\u0437\u0438 \u0438 \u0442.\u043f.;<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u0435\u043d\u044e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439<\/strong> \u2014 context-menu \u043f\u043e \u043a\u043b\u0438\u043a\u0443: <strong>\u00ab<\/strong>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0435<strong>\u00bb<\/strong>, <strong>\u00ab<\/strong>\u0423\u0434\u0430\u043b\u0438\u0442\u044c<strong>\u00bb<\/strong> \u0438 \u0442.\u0434.<\/p>\n<\/li>\n<\/ul>\n<h3>3. \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/h3>\n<p>\u041c\u044b \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043b\u0438 UX \u0434\u043b\u044f ER-\u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438 \u0431\u044b\u043b\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439: <\/p>\n<ul>\n<li>\n<p><strong>Drag&amp;Drop \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439<\/strong> \u2014 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 canvas;<\/p>\n<\/li>\n<li>\n<p><strong>Drag&amp;Drop \u043f\u043e\u043b\u0435\u0439<\/strong> \u2014 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442;<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/strong> \u2014 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u043f\u043e\u043b\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0430\u043d\u043e\u0440\u0430\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0445\u043e\u043b\u0441\u0442\u0430<\/strong> \u2014 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u044b\u0448\u0438.<\/p>\n<\/li>\n<\/ul>\n<h2>\ud83e\udde9 \u041e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u0441\u0432\u044f\u0437\u0435\u0439: \u043b\u0438\u043d\u0438\u0438, \u0434\u0443\u0433\u0438, \u043a\u0440\u0438\u0432\u044b\u0435<\/h2>\n<p>\u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u043c\u0438 \u043a \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0435:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u044f\u043c\u044b\u0435 \u043b\u0438\u043d\u0438\u0438 \u2014 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0436\u0451\u0441\u0442\u043a\u043e \u0438 \u043d\u0435\u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043b\u043e\u043c\u0430\u043d\u044b\u0435 \u043b\u0438\u043d\u0438\u0438 \u2014 \u0443\u0436\u0435 \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u044e\u0442 \u0445\u043e\u043b\u0441\u0442;<\/p>\n<\/li>\n<li>\n<p>\u0434\u0443\u0433\u0438 \u2014 \u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u0438.<\/p>\n<\/li>\n<\/ul>\n<h4>\ud83d\udca1 \u041a\u0440\u0438\u0432\u044b\u0435 \u0411\u0435\u0437\u044c\u0435 \u2014 \u043d\u0430\u0448 \u0432\u044b\u0431\u043e\u0440<\/h4>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443:<\/p>\n<ul>\n<li>\n<p>\u0433\u043b\u0430\u0434\u043a\u0438\u0435 \u0438\u0437\u0433\u0438\u0431\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043a \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 SVG path.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 SVG Path:<\/p>\n<pre><code>M 660 450 S 760 450 880 350 S 1100 250, 1100 250<\/code><\/pre>\n<figure class=\"full-width\">\n<div><figcaption>\u041a\u0440\u0438\u0432\u0430\u044f \u0431\u0435\u0437\u044c\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c Smooth<\/figcaption><\/div>\n<\/figure>\n<p>\ud83d\udd17 \u0423\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 SVG Path &#8212; <a href=\"https:\/\/svg-path-visualizer.netlify.app\">svg-path-visualizer<\/a><\/p>\n<p>\u0421\u0432\u044f\u0437\u044c \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043a\u0440\u0438\u0432\u0430\u044f \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 svg path<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">&lt;svg class=\"absolute w-full h-full pointer-events-none\"&gt;     &lt;defs&gt;         &lt;marker             id=\"arrow\"             viewBox=\"0 0 10 10\"             refX=\"10\"             refY=\"5\"             markerWidth=\"6\"             markerHeight=\"6\"             orient=\"auto-start-reverse\"         &gt;             &lt;path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"green\"&gt;&lt;\/path&gt;         &lt;\/marker&gt;     &lt;\/defs&gt;      &lt;path         [attr.d]=\"path()\"         [attr.stroke-width]=\"2.0\"         [attr.stroke]=\"lineColor\"         fill=\"none\"         marker-end=\"url(#arrow)\"     &gt;&lt;\/path&gt;      &lt;circle         [attr.cx]=\"sourceX()\"         [attr.cy]=\"sourceY()\"         r=\"5\"         fill=\"green\"     &gt;&lt;\/circle&gt; &lt;\/svg&gt;<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443, \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043a \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c \u0447\u0435\u0440\u0435\u0437 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443:<\/p>\n<h2>\ud83d\ude24 \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/h2>\n<ul>\n<li>\n<p><strong>\u0418\u0437\u0433\u0438\u0431\u044b \u00ab\u0443\u0445\u043e\u0434\u044f\u0442\u00bb<\/strong> \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u2014 \u0440\u0435\u0448\u0438\u043b\u0438, \u0441\u043c\u0435\u0449\u0430\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0437\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442;<\/p>\n<\/li>\n<li>\n<p><strong>SVG \u0432 Angular<\/strong> \u2014 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e path \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441;<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0438\u0439<\/strong> \u2014 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0440\u0435\u0448\u0435\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u0434\u0443\u043c\u0430\u0435\u043c \u043d\u0430\u0434 auto-routing.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043a\u0435\u0439\u0441\u043e\u0432, \u043a\u043e\u0433\u0434\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u0433\u0438\u0431\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c SVG Path \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c:<\/p>\n<pre><code>M 500 450 S 400 450 400 320.5 S 618 191, 618 191<\/code><\/pre>\n<figure class=\"\">\n<div><figcaption>\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a<\/figcaption><\/div>\n<\/figure>\n<p> \u041d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0438\u0436\u0435:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u043b\u0438\u043d\u0438\u0439 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<h2>\ud83d\udcbe \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0445\u0435\u043c\u044b<\/h2>\n<p>\u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f NgRx Signals. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b common.store.ts.<\/p>\n<details class=\"spoiler\">\n<summary>common.store.ts<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { signalStore, withMethods } from '@ngrx\/signals'; import { withNodes } from '.\/nodes.feature'; import { withEdges } from '.\/edges.feature';  export const CommonStore = signalStore( { providedIn: 'root' }, withNodes(), withEdges(), withMethods((store) =&amp;gt; ({})), ); <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043b\u0438\u043d\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b\u044b nodes.feature.ts \u0438 edges.feature.ts \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e<\/p>\n<details class=\"spoiler\">\n<summary>nodes.feature.ts<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { patchState, signalStoreFeature, type, withMethods, } from '@ngrx\/signals'; import { SelectEntityId, setAllEntities, updateEntity, withEntities, } from '@ngrx\/signals\/entities'; import { NodeItem } from '..\/model\/node-item.interface'; import { Guid } from 'guid-typescript';  const selectId: SelectEntityId = (item) =&gt; item.id.toString();  export function withNodes() { return signalStoreFeature( withEntities({ entity: type(), collection: 'nodes', }), withMethods((store) =&gt; ({ setNodes(nodes: NodeItem[]) { patchState( store, setAllEntities(nodes, { collection: 'nodes', selectId }), ); },  getNodeById(id: Guid) { return store.nodesEntities().find((node) =&gt; node.id === id); },  updateNodePosition( id: Guid, position: { x: number; y: number }, ): void { patchState( store, updateEntity( { id: id.toString(), changes: () =&gt; ({ position: { ...position } }), }, { collection: 'nodes', selectId }, ), ); }, })), ); } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>edges.feature.ts<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { patchState, signalStoreFeature, type, withMethods, } from '@ngrx\/signals'; import { SelectEntityId, setAllEntities, withEntities, } from '@ngrx\/signals\/entities'; import { Guid } from 'guid-typescript';  export interface Edge { id: Guid; sourceId: Guid; targetId: Guid; }  const selectId: SelectEntityId = (item) =&gt; item.id.toString();  export function withEdges() { return signalStoreFeature( withEntities({ entity: type(), collection: 'edges', }), withMethods((store) =&gt; ({ setEdges(edges: Edge[]) { patchState( store, setAllEntities(edges, { collection: 'edges', selectId }) ); } })), ); } <\/code><\/pre>\n<\/div>\n<\/details>\n<h2>\u2705 \u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>Angular \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u2014 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 SVG \u0438 signals. \u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u2014 \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u0418 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0435\u0433\u043e <strong>\u00ab<\/strong>\u0434\u043b\u044f \u0441\u0435\u0431\u044f<strong>\u00bb<\/strong>, \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c.<\/p>\n<figure class=\"bordered full-width\"><\/figure>\n<div class=\"floating-image\">\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 ER-\u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/chubkoiv.github.io\/ng-erdesigner-example\">\u0437\u0434\u0435\u0441\u044c<\/a>.<br \/>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043b\u0438\u043d\u0438\u0439 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/chubkoiv\/ng-erdesigner-example.git\">github<\/a>, <a href=\"https:\/\/stackblitz.com\/~\/github.com\/chubkoiv\/ng-erdesigner-example\">stackblitz<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/897284\/\"> https:\/\/habr.com\/ru\/articles\/897284\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-457969","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=457969"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457969\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}