question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clipping to viewport should exclude clipped regions from total size

See original GitHub issue

The following spec shows unclipped viewport content overflowing the viewport and expanding the bounds of the overall canvas:

image

{
  "mark": {
    "type": "text",
    "fontSize" : 100
  },
  "width" : 200,
  "height" : 200,
  "config" : {
    "background": "lightgreen",
    "view" : {
      "clip" : false,
      "fill": "lightblue"
    }
  },
  "data" : {
    "values" : [["ABCDE"]]
  },
  "encoding" : {
    "text" : {
      "field" : "0"
    }
  }
}

However, when you set clip to “true”, the overall rendered dimensions remain the same, just the overflow contents are hidden:

image

What one would expect to happen is that the region that is clipped out of the viewport would no longer contribute to the overall size calculation of the canvas, like this:

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jheercommented, Aug 22, 2019

Sounds good to me. Just clarifying above to make sure everyone’s on the same page!

0reactions
domoritzcommented, Aug 22, 2019

Just to clarify whether there is an action item for Vega-Lite here. The view-level clipping in the example is manually set in the Vega-Lite spec. Vega-Lite generates correct clipping of only marks for example in our overview+detail example. As I understand it, Vega-Lite doesn’t need to change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clipping the Data Frame—ArcMap | Documentation
Using this graphic, you can clip the data frame to better highlight the area of interest—in this example, the Aegean Sea. Data frame...
Read more >
Should non-root elements be clipped when capturing them? · Issue ...
My proposal would be to clip at max texture size in v1. And add a performance hint that allows clipping further later or...
Read more >
View Regions — Blender Manual
Once clipping is used, you will only see what's inside the volume you defined. Tools such as paint, sculpt, selection, transform snapping, etc....
Read more >
Computer Graphics 4.1: Window, Viewport and Clipping
computergraphics #windowviewportWindow , Viewport and Clipping Explained. ... try restarting your device. Your browser can 't play this video.
Read more >
Clipping And Viewport Mapping // OpenGL Beginners Series
In this video I cover some of the action that takes place at the end of the vertex level processing of the graphics...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found