mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Operation sprites
This commit is contained in:
+10
-10
@@ -470,15 +470,15 @@ button[disabled] .icon.nearby { background-position: -340px -40px;}
|
||||
.icon.big-inspect { background-position: -160px -80px;}
|
||||
.icon.big-relation { background-position: -200px -80px;}
|
||||
|
||||
.icon.operation.delete { background-position: 0px -140px;}
|
||||
.icon.operation.circularize { background-position: -20px -140px;}
|
||||
.icon.operation.straighten { background-position: -40px -140px;}
|
||||
.icon.operation.split { background-position: -60px -140px;}
|
||||
.icon.operation.unjoin { background-position: -80px -140px;}
|
||||
.icon.operation.reverse { background-position: -100px -140px;}
|
||||
.icon.operation.move { background-position: -120px -140px;}
|
||||
.icon.operation.merge { background-position: -140px -140px;}
|
||||
.icon.operation.orthogonalize { background-position: -160px -140px;}
|
||||
.icon-operation-delete { background-position: 0px -140px;}
|
||||
.icon-operation-circularize { background-position: -20px -140px;}
|
||||
.icon-operation-straighten { background-position: -40px -140px;}
|
||||
.icon-operation-split { background-position: -60px -140px;}
|
||||
.icon-operation-unjoin { background-position: -80px -140px;}
|
||||
.icon-operation-reverse { background-position: -100px -140px;}
|
||||
.icon-operation-move { background-position: -120px -140px;}
|
||||
.icon-operation-merge { background-position: -140px -140px;}
|
||||
.icon-operation-orthogonalize { background-position: -160px -140px;}
|
||||
|
||||
|
||||
/* Toggle icon is special */
|
||||
@@ -1195,7 +1195,7 @@ a.success-action {
|
||||
fill: rgba(255,255,255,.5);
|
||||
}
|
||||
|
||||
.radial-menu image {
|
||||
.radial-menu .icon {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -81,7 +81,7 @@
|
||||
<script src="js/id/actions/delete_way.js"></script>
|
||||
<script src='js/id/actions/move_node.js'></script>
|
||||
<script src='js/id/actions/move_way.js'></script>
|
||||
<script src='js/id/actions/circular.js'></script>
|
||||
<script src='js/id/actions/circularize.js'></script>
|
||||
<script src='js/id/actions/noop.js'></script>
|
||||
<script src='js/id/actions/reverse_way.js'></script>
|
||||
<script src='js/id/actions/split_way.js'></script>
|
||||
@@ -107,7 +107,7 @@
|
||||
<script src='js/id/modes/select.js'></script>
|
||||
|
||||
<script src='js/id/operations.js'></script>
|
||||
<script src='js/id/operations/circular.js'></script>
|
||||
<script src='js/id/operations/circularize.js'></script>
|
||||
<script src='js/id/operations/delete.js'></script>
|
||||
<script src='js/id/operations/move.js'></script>
|
||||
<script src='js/id/operations/reverse.js'></script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
iD.actions.Circular = function(wayId, map) {
|
||||
iD.actions.Circularize = function(wayId, map) {
|
||||
|
||||
var action = function(graph) {
|
||||
var way = graph.entity(wayId),
|
||||
@@ -1,6 +1,6 @@
|
||||
iD.operations.Circular = function(entityId, mode) {
|
||||
iD.operations.Circularize = function(entityId, mode) {
|
||||
var history = mode.map.history(),
|
||||
action = iD.actions.Circular(entityId, mode.map);
|
||||
action = iD.actions.Circularize(entityId, mode.map);
|
||||
|
||||
var operation = function() {
|
||||
var graph = history.graph(),
|
||||
@@ -30,9 +30,9 @@ iD.operations.Circular = function(entityId, mode) {
|
||||
return action.enabled(graph);
|
||||
};
|
||||
|
||||
operation.id = "circular";
|
||||
operation.id = "circularize";
|
||||
operation.key = "O";
|
||||
operation.title = "Circular";
|
||||
operation.title = "Circularize";
|
||||
operation.description = "Make this round";
|
||||
|
||||
return operation;
|
||||
@@ -50,11 +50,15 @@ iD.ui.RadialMenu = function(operations) {
|
||||
.on('mouseover', mouseover)
|
||||
.on('mouseout', mouseout);
|
||||
|
||||
button.append('image')
|
||||
.attr('width', 16)
|
||||
.attr('height', 16)
|
||||
.attr('transform', 'translate(-8, -8)')
|
||||
.attr('xlink:href', 'icons/helipad.png');
|
||||
var image = button.append('foreignObject')
|
||||
.style('pointer-events', 'none')
|
||||
.attr('width', 20)
|
||||
.attr('height', 20)
|
||||
.attr('x', -10)
|
||||
.attr('y', -10);
|
||||
|
||||
image.append('xhtml:span')
|
||||
.attr('class', function (d) { return 'icon icon-operation icon-operation-' + d.id; });
|
||||
|
||||
var tooltip = menu.append('foreignObject')
|
||||
.style('display', 'none')
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@
|
||||
<script src='../js/id/actions/add_way.js'></script>
|
||||
<script src='../js/id/actions/add_way_node.js'></script>
|
||||
<script src='../js/id/actions/change_entity_tags.js'></script>
|
||||
<script src='../js/id/actions/circular.js'></script>
|
||||
<script src='../js/id/actions/circularize.js'></script>
|
||||
<script src="../js/id/actions/delete_node.js"></script>
|
||||
<script src="../js/id/actions/delete_way.js"></script>
|
||||
<script src='../js/id/actions/move_node.js'></script>
|
||||
@@ -102,7 +102,7 @@
|
||||
<script src='../js/id/modes/select.js'></script>
|
||||
|
||||
<script src='../js/id/operations.js'></script>
|
||||
<script src='../js/id/operations/circular.js'></script>
|
||||
<script src='../js/id/operations/circularize.js'></script>
|
||||
<script src='../js/id/operations/delete.js'></script>
|
||||
<script src='../js/id/operations/move.js'></script>
|
||||
<script src='../js/id/operations/reverse.js'></script>
|
||||
|
||||
Reference in New Issue
Block a user