Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
purr-data
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
268
Issues
268
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jonathan Wilkes
purr-data
Commits
ab2f5609
Commit
ab2f5609
authored
Nov 02, 2020
by
Jonathan Wilkes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert to using SVG background image, add "experimental" to description
parent
c14dc7e1
Pipeline
#3021
failed with stage
in 186 minutes and 54 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
11 deletions
+5
-11
pd/nw/locales/en/translation.json
pd/nw/locales/en/translation.json
+1
-1
pd/nw/pdgui.js
pd/nw/pdgui.js
+4
-10
No files found.
pd/nw/locales/en/translation.json
View file @
ab2f5609
...
...
@@ -432,7 +432,7 @@
"footgun"
:
"Footgun"
},
"grid"
:
{
"show_grid"
:
"snap to grid"
,
"show_grid"
:
"snap to grid
(experimental)
"
,
"show_grid_tt"
:
"Snap to the grid in edit mode"
},
"zoom"
:
{
...
...
pd/nw/pdgui.js
View file @
ab2f5609
...
...
@@ -1442,8 +1442,6 @@ function get_grid_coords(cid, svg_elem) {
// the same grid with a lower opacity. That way the edit mode is always
// visually distinct from run mode.
var
create_editmode_bg
=
function
(
cid
,
svg_elem
)
{
return
"
linear-gradient(transparent 9px, rgba(220,220,200,.8) 10px, transparent 10px), linear-gradient(90deg, transparent 9px, rgba(220,220,200,.8) 10px, transparent 10px)
"
;
var
head
,
body
,
tail
,
cell_data_str
,
opacity_str
,
grid
,
size
,
pos
;
grid
=
showgrid
[
cid
];
size
=
gridsize
[
cid
];
...
...
@@ -1479,16 +1477,9 @@ var create_editmode_bg = function(cid, svg_elem) {
function
set_editmode_bg
(
cid
,
svg_elem
,
state
)
{
// If we're setting the bg, figure out the correct offset first
// if (state) {
// set_grid_position(cid, svg_elem);
// }
patchwin
[
cid
].
window
.
document
.
body
.
style
.
setProperty
(
"
background-image
"
,
state
?
create_editmode_bg
(
cid
,
svg_elem
)
:
"
none
"
);
patchwin
[
cid
].
window
.
document
.
body
.
style
.
setProperty
(
"
background-size
"
,
"
100% 10px, 10px 100%
"
);
}
function
update_svg_background
(
cid
,
svg_elem
)
{
...
...
@@ -6826,7 +6817,10 @@ function do_getscroll(cid, checkgeom) {
width
:
width
,
height
:
height
});
// Now update the svg's background if we're in edit mode
// Now update the svg's background if we're in edit mode. This adds
// a new background image to the body of the document each time.
// So if there is a performance regression with do_getscroll when
// in editmode, this could be the culprit.
update_svg_background
(
cid
,
svg_elem
);
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment