Comments (3)
I don't have any experience with this DOM API, but from what I read, an IntersectionObserver can be used to execute code when a dom element becomes visible. With that, the clientWidth could be calculated only when the innerwiki dom is visible and thereby get the correct value.
Ideas for workarounds until the issue is fixed:
- Don't use zoomin view or tabs macro (as you mentioned at TW talk
- Add a refresh button to make it a little easier to refresh the innerwiki:
<$button actions="<$action-listops $tiddler='$:/temp/innerwiki-refresh' $field=text $subfilter=':and[cycle[on off]]'/>">Refresh innerwiki</$button>
<$list name=refresh filter="hello.js $:/temp/innerwiki-refresh :and[get[text]join[]]">
<$innerwiki width="600" height="400" style="width:100%;">
[...]
from tiddlywiki5.
Thanks @ittayd @btheado. I've made some experiments in the past and found IntersectionObserver awkward to use within a TW widget. A simpler alternative fix might be to adjust the scaling and anchor positions when there is a refresh. That approach would not be able to detect changes to the innerwiki size triggered by the window size changing, but I think it would fix the specific problem with the zooming storyview described in the OP.
from tiddlywiki5.
I'd like to add that i don't know why scaling is required. If I want to clip some content I usually want just that. Perhaps instead of trying to calculate scaling automatically, there can be an attribute the user can set if they wish scaling. It can be a fixed number or 'auto' (in which case the existing calculation will be used)
from tiddlywiki5.
Related Issues (20)
- [BUG] recursive failure in TestCaseWidget transclusion tests beginning with {{{}} HOT 1
- [BUG] changed error handling by using a script published by EricShulman "EditLink" in newer TW versions HOT 3
- [IDEA] Template Aliases to Shorten The Long Titles
- [IDEA] Make styleblocks benefit from "filtered transclusion as parameter" behaviour HOT 2
- [BUG] Exporting mutilates some css selectors HOT 11
- [IDEA] The number of blank lines in editing matches that in reading. HOT 1
- [IDEA] Keybaord shortcuts for all $:/tags/EditToolbar buttons HOT 3
- [IDEA] Better Rules for Dynamic Stylesheets HOT 2
- [IDEA] Support image drag & drop (cut & paste) for markdown tiddlers HOT 1
- [BUG] Custom Messages Does Not Work with tm-copy-to-clipboard in TW 5.3.5 HOT 3
- [BUG] Wikitext Macros HOT 1
- [BUG] When Import Canceled, TiddlyWiki Does not Delete SateTiddlers HOT 2
- [IDEA] Color "Saved wiki" lightgreen instead of yellow HOT 3
- [IDEA] $:/core/ui/testcases/DefaultTemplate should have "code-body:yes"
- [IDEA] TiddlyWiki5 should be pinned at the project landing page HOT 1
- [BUG] TiddlyWiki/TiddlyWiki5 contains 94 branches, where most are merged or closed
- Vercel Preview doesn't work after migration to TiddlyWiki/TiddlyWiki5 HOT 9
- [IDEA] Add oEmbed / OpenGraph metatags HOT 11
- [BUG] Geospatial plugin's olc-decode and geopoint operators have reversed latitude and longitude HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiddlywiki5.