mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
Add license; translate the group, not the start point of the path
This commit is contained in:
@@ -1,4 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
@license
|
||||
Blockly Tests
|
||||
|
||||
Copyright 2019 Google Inc.
|
||||
https://developers.google.com/blockly/
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
@@ -29,9 +48,12 @@
|
||||
var svgSpace;
|
||||
|
||||
function addPathAt(path, x, y) {
|
||||
var group = Blockly.utils.createSvgElement('g', {}, svgSpace);
|
||||
var group = Blockly.utils.createSvgElement('g',
|
||||
{
|
||||
'transform': 'translate(' + (x + 50) + ', ' + y + ')'
|
||||
}, svgSpace);
|
||||
Blockly.utils.createSvgElement('path', {
|
||||
'd': 'm ' + (x + 50) + ',' + y + ' ' + path,
|
||||
'd': 'M 0,0 ' + path,
|
||||
'marker-start': 'url(#startDot)',
|
||||
'marker-end': 'url(#endDot)',
|
||||
'class': 'pathDebugClass'
|
||||
|
||||
Reference in New Issue
Block a user