/
githubmirror
/
oppia
Обзор
Документация
Войти
/
githubmirror
/
oppia
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
extensions/interactions/GraphInput/directives/graph-input-response.component.html
53 строки
2 KB
Ana Margarida Almeida
Fix issue #13699: fix response tooltip misplaced and image doesn't show up (#20147)
08 июн 2024, 21:12
Не верифицирован
08 июн 2024, 21:12
220b019
Код
Авторство
О чём код?
<style> .oppia-graph-response-container { background-color: white; cursor: default; } .unselectable-text { cursor: default; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -o-user-select: none; } .unclickable-text { pointer-events: none; } </style> <div class="oppia-graph-response-container"> <svg [attr.height]="HEIGHT" [attr.width]="WIDTH"> <rect x="0" y="0" width="100%" height="100%" fill="none" stroke="black" stroke-width="2"/> <g *ngFor="let edge of graph.edges; let idx = index"> <line [attr.x1]="graph.vertices[edge.src].x" [attr.y1]="graph.vertices[edge.src].y" [attr.x2]="graph.vertices[edge.dst].x" [attr.y2]="graph.vertices[edge.dst].y" [style.stroke]="'black'" [style.strokeWidth]="EDGE_WIDTH_PX"> </line> <polygon *ngIf="graph.isDirected" [attr.points]="getDirectedEdgeArrowPoints(idx)" [style.fill]="'black'"> </polygon> <text *ngIf="graph.isWeighted" [attr.x]="getEdgeCentre(idx).x" [attr.y]="getEdgeCentre(idx).y - 12" class="unselectable-text"> {{edge.weight}} </text> </g> <g *ngFor="let vertex of graph.vertices" attr.transform="translate({{vertex.x}}, {{vertex.y}})"> <text *ngIf="graph.isLabeled" x="0" y="-10" class="unselectable-text"> {{vertex.label}} </text> <circle cx="0" cy="0" [attr.r]="VERTEX_RADIUS_PX"> </circle> </g> </svg> </div>