2016-06-09 14:47:58 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
#
|
|
|
|
# Copyright (C) 2016 GNS3 Technologies Inc.
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
LABEL_OBJECT_SCHEMA = {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2016-07-01 12:37:59 +00:00
|
|
|
"text": {"type": "string"},
|
|
|
|
"style": {
|
|
|
|
"description": "SVG style attribute",
|
|
|
|
"type": "string"
|
2016-06-09 14:47:58 +00:00
|
|
|
},
|
2016-07-01 12:37:59 +00:00
|
|
|
"x": {
|
2016-08-17 15:12:23 +00:00
|
|
|
"description": "Relative X position of the label. If null center it",
|
|
|
|
"type": ["integer", "null"]
|
2016-07-01 12:37:59 +00:00
|
|
|
},
|
|
|
|
"y": {
|
|
|
|
"description": "Relative Y position of the label",
|
|
|
|
"type": "integer"
|
2016-06-09 14:47:58 +00:00
|
|
|
},
|
2016-07-01 13:30:38 +00:00
|
|
|
"rotation": {
|
|
|
|
"description": "Rotation of the label",
|
2016-09-06 12:54:13 +00:00
|
|
|
"type": "integer",
|
|
|
|
"minimum": -359,
|
|
|
|
"maximum": 360
|
2016-07-01 13:30:38 +00:00
|
|
|
},
|
2016-06-09 14:47:58 +00:00
|
|
|
},
|
|
|
|
"required": [
|
|
|
|
"text",
|
|
|
|
"x",
|
|
|
|
"y"
|
|
|
|
],
|
|
|
|
"additionalProperties": False
|
|
|
|
}
|